Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Need Help

Hello, in line:

 

I am using mosquitto broker, I have around 100 subscriber connected to it.

Is there some way for me to get a list of subscriber that have been disconnected.


Not as an implicit feature of Mosquitto (I think)
 

 

In other words, do we have some way to know if a subscriber is connected to broker or not, by sending the subscriber ID.


make your client publish a retained message in a given topic (for example myapp/disconnected_users/theuserID). Your client could publish in this topic when disconnecting and also could set the message to be published as a WILL in the same topic (to handle spureous disconnections). And they could remove these messages once they are connected again.

You only have to subscribe myapp/disconnected_users/# to know which users are disconnected.

Also, this is the technique suggested in https://github.com/mqtt/mqtt.github.io/wiki/presence

Regards.
 

 

 

Thanks & Regards,

S. Harpreet Singh

Digital Enterprise Services | Tech Mahindra

Mobile# +91-9417575242  (India)

Landline : 0172 666 8601

EXT : 8601

Email : harpreet.singhgumber@xxxxxxxxxxxxxxxx

 

 


============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================


_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev



--
---
Manuel Domínguez Dorado
ingeniero ARROBA ManoloDominguez PUNTO com
http://www.ManoloDominguez.com

Back to the top