I am using mqtt protocol for chat. So i have a requirement in my project to send push notification to subscriber when subscriber disconnected. I searched a lot about how can i get to know when subscriber or any person leave room chat. i read about last will message,but it will be delivered by broker when any user disconnected unexpectedly or application close.
Is there any flag or point where i can know when user simply disconnect itself.
I am using mosquitto broker.
Thanks
In short, no.
Only the application that manages connections will know when users connect/disconnect/send messages etc..
You should be able to handle all of that logic in a separate place from the message broker/ messaging protocol.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加