hbmqtt icon indicating copy to clipboard operation
hbmqtt copied to clipboard

On_Connect and On_Disconnect handlers

Open STEVEOO6 opened this issue 6 years ago • 2 comments

Is there currently a supported (or unsupported) method to add callback handlers for the on_connect and on_disconnect event?

From stepping through the source, it looks like registering a Plugin would be the best way to get this done, but I'm unsure about how to do that (I couldn't find any documentation on how to create/register a plugin).

Any thoughts/direction/tips would be greatly appreciated.

STEVEOO6 avatar May 24 '18 01:05 STEVEOO6

on_connect callback should be really useful for subscribing to topic. with auto_reconnect on I can't find the right place to run subscribes at any connect.

on_message callback should be good too.

marcolertora avatar May 29 '19 16:05 marcolertora

hi bros, anyone know how broke can handle message received? thanks!

KennyDizi avatar Nov 21 '19 14:11 KennyDizi