'Does IotHub>EventHub>FA store the sequence of the message sent

Here is the scenario:

Device1 sends two iothub D2C Messages at one time:

  1. That sets the flag to true
  2. That sets the flag to false

The Iot Messge Routing routs the message to eventhub which will trigger the EventHubTriggered Function App: In this case, is it guaranteed that the flag value will be false as the 2 was sent after 1?



Solution 1:[1]

Azure IoT Hub guarantees that messages are sent in order for that unique device. It does not guarantee ordering between devices:

example : device a sends [a1,a2,a3] and then device b sends [b1,b2,b3] . IoT Hub will guarantee that a3 is always received after a1 and a2, though it can happen that [b1,b2,b3] are all received before [a1,a2,a3].

The Iot Messge Routing routs the message to eventhub which will trigger the EventHubTriggered Function App: In this case, is it guaranteed that the flag value will be false as the 2 was sent after 1?

Yes! Because this is sent by the same device and IoT Hub only expects one connection per device.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 asergaz