Testing Azure IoTHub Manual failover


The Azure IoTHub is the center of all the IoT efforts of Microsoft. Over the last couple of years (or even months) we see a lot of innovations from that side.


The latest addition is the Manual failover which is now in preview.


This makes it possible to move a complete IoTHub (with eg. all of its devices and routes) to the ‘sister region’. For example, an IoTHub living in West US 2 will move to West Central US. And you can move it back too.


The manual failover is a good starting point for having a more resilient IoTHub. It’s not perfect, there is a chance that unread messages or data is lost:



But it’s a perfect way to test the ‘automatic’ failover which Microsoft provides when something happens with the region your IoTHub is living in.


I wanted to test this failover. And I wanted to build a client-side solution so I would not lose any messages.


Let’s see how it can be tested.


Read the full article here


Confirm failoverConfirm failover


Device Client with added Queue logic (code available)Device Client with added Queue logic (code available)


Failover is performedFailover is performed

All D2C messages arrived and persisted, no message lossAll D2C messages arrived and persisted, no message loss

0 Replies