Let's say I have two clients with client id's device1 and device2. Before device1 sends a publish message to broker it needs to check if device2 is still connected to the broker. How can I check the connectivity of device2 from client device1.?
I am using mosquitto broker and paho client