0

I'm using the paho.mqtt.c library to connect to an Azure IoT Hub. I want to test how my software handles disconnections from the IoT Hub.

How can I simulate the IoT Hub disconnecting the client?

There is no "Stop IoT Hub" button in the Azure Portal -> IoT Hub.

Jon Th
  • 347
  • 2
  • 13

1 Answers1

1

The following are some cases for disconnecting a mqtt device from Azure IoT Hub:

  • connecting a mqtt device with the same deviceId
  • publishing on the wrong topic, for instance: abcd
  • Disable a device connection to IoT Hub on the portal
  • using the REST API for disable a device, see my answer here
Roman Kiss
  • 7,925
  • 1
  • 8
  • 21