Connection Notification
The connection notification feature allows you to register a callback function for a particular Broker client that will be invoked if the client is disconnected from the Broker. The connection notification feature can be particularly useful if your Broker client is using the automatic reconnect feature and needs to know when it has been reconnected to the Broker.
Note:
Connection callback functions do not have a global scope. They must be registered separately for each Broker client that wishes to use this feature.