Send IoT Hub Cloud-to-Device message from Stream A

2019-08-21 11:16发布

问题:

We use Stream Analytics successfully for ingesting event messages sent from IoT Hub devices. Stream Analytics supports IoT Hub as Input stream out of the box. But now we have a requirement to send the Stream Analytics Output result to an IoT Hub Device. We are able to setup an Event Hub connection to IoT Hub as the Output sink for Stream Analytics, but we get an error event raised: Message: Access to the Event Hub has been denied. The token may have an invalid signature.

Which raises the question; is it at all possible to send IoT Hub Cloud-to-Device messages from an Stream Analytics Output sink?

回答1:

  • Sending an IoT Hub C2D Message (non-telemetry path) from the Stream Analytics job can be done indirectly via the Service Bus entity (Queue/Topic), see the following screen snippet:

ASA-to-Device Messaging