0

I'm writing an Aedes based MQTT broker tied to my application server, that has an object called device with its corresponding id and mode, that can be enabled or disabled.

My field device connects to my server and autheticates itself using its MAC address as the id. From there start sending messages to the application server.

My problem arises when the user changes the mode from enabled to disabled... I need to force a client disconnection at that moment to stop receiving device data.

My first tought is to send a disconnection message to the client that will disconnect itself, but looks like this can be a non optimal solution...

Is there a way to force a client disconnect from aedes server, something like:

aedes.forceClientDisconnect()

Is sending down a disconnection message and rely on the client to disconnect the only way to do it?

Mendes
  • 17,489
  • 35
  • 150
  • 263

0 Answers0