Closed gabrielSoudry closed 6 days ago
The creation of the device client is dependent on the connection string which belongs to a specific hub. Unless the device client is created again with a different connection string reconnecting to a different hub on the fly not possible.
As this would be a significant change/addition to functionality we are not delivering new features at this time and are focusing on security and stability.
Since this is a very specific failover scenario, one of the approaches could be create the device client again using a different connection string in application-level code.
Thanks for your response, while I understand that the creation of the device client is tied to a specific connection string, in the case of a failover IoT Hub in another region, the connection using the X.509 certificate remains valid. Since it is the same IoT Hub (just a failover instance in a different region), the certificate is still applicable.
@olivakar any news ? can you reopen the issue please
Context
Description of the issue
We are using Azure IoT Hub with a failover setup between two regions,
France Central
andFrance South
, both configured with Private Links. When we initiate a failover from France Central to France South, the IoT Hub successfully fails over, and DNS resolves to the new IP as expected. However, the Azure SDK client does not reconnect automatically after the failover, even though the DNS resolves correctly.We would expect the SDK to handle the reconnection automatically when the DNS updates, but this does not happen.
Restart the python service work, but this defeats the purpose of the failover resilience.
Steps to Reproduce:
Expected Behavior: The Azure SDK client should automatically reconnect to the IoT Hub after failover, when DNS has updated to the new region's IP address.
Actual Behavior: The Azure SDK client fails to reconnect to the IoT Hub after the failover, even though DNS resolves to the correct IP address. The Azure SDK client does not reconnect automatically after the failover, and instead of retrying to reconnect, it remains stuck.