Share via

Does IoThub pushes the historic data to event hub when we create a new message routing?

Vaishnav, Nagesh K 20 Reputation points
2024-10-16T14:19:40.73+00:00

I want to understand whether Event Hub gets the Historic data from IoT Hub at the instance of creation of event hub endpoint?

Azure IoT Hub
Azure IoT Hub

An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.

Azure Event Hubs

Answer accepted by question author
  1. Adharsh Santhanam 8,210 Reputation points Microsoft Employee Volunteer Moderator
    2024-10-16T14:52:31.5966667+00:00

    Hello Vaishnav, Nagesh K, when you create an Event Hub endpoint for an IoT Hub, it does not automatically receive historical data. The data export starts from the moment you enable the endpoint, and only new data from that point onward will be sent to the Event Hub.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 37,056 Reputation points MVP
    2024-10-16T15:07:45.1733333+00:00

    Hello Vaishnav, Nagesh K,

    welcome to this moderated Azure community forum.

    The answer coming from @Adharsh Santhanam is correct if you check the portal. The EventHub is not able to 'replay' old data.

    I add an extra answer because the IoT Hub provides a 'replay' of old data until the moment the data in the IoT Hub is expired via the TTL option.

    Check out the Stream Analytics job ability to 'time travel in the past'.

    You can stream the data coming out of the IoT Hub multiple times if you set the custom field.

    This seems to be an EventHub feature (the underlying streaming functionality within the IoT Hub).

    More information about this EventHub capability can be found in the Reading Events sample for the Azure.Messaging.EventHubs package.

    I'm not sure if this code sample will work for the IoT Hub event-hub compatible endpoint too.


    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.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.