0

I'm using Java SDK direct method to send a message to a device and get back some data. The connection stays open for a couple of minutes, as there is no guarantee when the data will be sent back. This is a part of an API call, so when a connection between a client and API gets closed, I would like to ensure the connection between IoT Hub and the device is closed as well. Is there a way to do that without waiting for the configured timeout to expire?

Roman Svitukha
  • 1,302
  • 1
  • 12
  • 22
  • You can refer to [How to force stop direct message connection?](https://learn.microsoft.com/en-us/answers/questions/556848/how-to-force-stop-direct-message-connection.html) and [Disconnection race condition](https://github.com/Azure/azure-iot-sdk-java/issues/1343). You can also open an issue here: https://github.com/Azure/azure-iot-sdk-java/issues/new/choose – Ecstasy Sep 21 '21 at 11:15
  • 1
    thanks @DeepDave-MT the first link is also to my question which just got answered by António Sérgio Azevedo. – Roman Svitukha Sep 22 '21 at 01:09

0 Answers0