Search code examples
mqttmosquitto

Detecting duplicate client ids in MQTT?


I am using the Python Paho MQTT library and Mosquitto broker both with 3.1.1

If two clients connect with the same id (for whatever reason), both clients keep getting disconnected and then connect in a loop forever.

on_disconnect has a rc of 1 but connect has an rc of 0 (then it gets disconnected)

Is there anyway to detect that the issue is duplicated clientid?


Solution

  • Not yet. Hopefully this will be addressed in a future version of the spec.