How do I see the data I send as a Message from my Device to the IoT Hub come into the Stream Analytics Job?

Paul Jinwoo Lee 20 Reputation points
2023-10-19T05:28:04.34+00:00

I can confirm that I see my device send messages successfully into the IoT hub. I see the activity in the hub and while monitoring the hub.

However, even with the IoT Hub set as the input for a Stream Analytics Job, when I test the query after sending the job to the hub queue, it continues to say that there is no data input from the hub.

Any advice on this? Thank you.

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
548 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,138 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde 29,931 Reputation points MVP
    2023-10-19T07:14:09.53+00:00

    Hello @Paul Jinwoo Lee ,

    welcome to this moderated community forum.

    While you check the Stream Analytics connection as @-- describes, can you confirm the Stream Analytics job has its own consumer group?

    Consumer groups are set on the built-in endpoint in the IoT Hub:User's image

    Each consumer group gets its own copy of incoming messages. If not set, consumers have to use the same group and thus the same stream resulting in errors.

    Next to that, do you use routing together with the built-in endpoint?

    If that is the case, you need to create an extra route for the built-in endpoint.

    See the text on the Rotes page:

    User's image

    If so, your normal route is picking all messages up, leaving no message for (the now) fallback route.

    Just add that extra route of listening to 'events'.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Wilko van de Velde 2,226 Reputation points
    2023-10-19T06:29:37.8433333+00:00

    Hi Paul,

    Did you check the input source in Stream Analytics?

    1. Open Stream Analytics
    2. Select Inputs
    3. Behind the IoT hub input there are three icons:
      User's image
    4. First test the connection with the first icon
    5. If the connection is ok, try the third icon to retrieve sample data.