How to use exponential back-off logic in Azure device client?
I have a job in C# which runs every 5 minutes and acts like a heartbeat to check the client status
When the status is Disconnected_Retrying, I exit the timer job assuming retry will work. However, status always comes as Disconnected_Retrying and leads to unnecessary calls/request to server every 5 minute. Hence I am thinking of implementing exponential backoff method to overcome this issue
Started reading below GitHib code https://github.com/Azure/azure-iot-sdk-csharp/blob/main/iothub/device/src/RetryPolicies/ExponentialBackoff.cs
But I am not able to understand how to implement it.
Note: I have created same question in stack overflow for better reach