MQTT:How to know when user disconnect

Prabjot Singh

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

theWanderer4865

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]

編集
0

コメントを追加

0

関連記事

分類Dev

Reconnect with XMPP when user is getting error or disconnect from XMPP

分類Dev

How to know when StreamReader is ready?

分類Dev

How to handle mqtt loop_forever function when using Django?

分類Dev

How to know when the tasks of threadpool is over in java

分類Dev

RXJS How to Know When Finalize Completes?

分類Dev

How do compilers know when not to recompile?

分類Dev

How to know when a block has been completed

分類Dev

How to open a GUI application and 'disconnect' it?

分類Dev

How to disconnect git for a project in intellij?

分類Dev

How to know if a user already has a role in an addrole command

分類Dev

How to know if a user already has a role in an addrole command

分類Dev

How to know if a flutter image has been seen by the user

分類Dev

How to know the address range of kernel stack in user process and kernel thread?

分類Dev

How to know the values of CR registers from linux user and kernel modes

分類Dev

How can I disconnect a django signal?

分類Dev

How to disconnect a client from NIO server socket

分類Dev

How do I know when to use `const ref` or `in`?

分類Dev

How to know when all Promises are Resolved in a dynamic "iterable" parameter?

分類Dev

How can i know when the library is fully loaded

分類Dev

How to know when Composition animation 'ScalarKeyFrameAnimation' (or similar) finished

分類Dev

How do I know when a javascript method ends

分類Dev

How to capture traffic in monitor mode when you know the password

分類Dev

How to know if there is Internet when using Parse.com Android

分類Dev

How does my browser know to refresh when I start nginx?

分類Dev

how to know programmatically when a last call was made to a specific number

分類Dev

How to know when to put closing tag on nested elements

分類Dev

How do I know when a new beta CD is released?

分類Dev

MQTT.js ability to know all subscriber receive publish message

分類Dev

How to use MQTT over the internet?

Related 関連記事

  1. 1

    Reconnect with XMPP when user is getting error or disconnect from XMPP

  2. 2

    How to know when StreamReader is ready?

  3. 3

    How to handle mqtt loop_forever function when using Django?

  4. 4

    How to know when the tasks of threadpool is over in java

  5. 5

    RXJS How to Know When Finalize Completes?

  6. 6

    How do compilers know when not to recompile?

  7. 7

    How to know when a block has been completed

  8. 8

    How to open a GUI application and 'disconnect' it?

  9. 9

    How to disconnect git for a project in intellij?

  10. 10

    How to know if a user already has a role in an addrole command

  11. 11

    How to know if a user already has a role in an addrole command

  12. 12

    How to know if a flutter image has been seen by the user

  13. 13

    How to know the address range of kernel stack in user process and kernel thread?

  14. 14

    How to know the values of CR registers from linux user and kernel modes

  15. 15

    How can I disconnect a django signal?

  16. 16

    How to disconnect a client from NIO server socket

  17. 17

    How do I know when to use `const ref` or `in`?

  18. 18

    How to know when all Promises are Resolved in a dynamic "iterable" parameter?

  19. 19

    How can i know when the library is fully loaded

  20. 20

    How to know when Composition animation 'ScalarKeyFrameAnimation' (or similar) finished

  21. 21

    How do I know when a javascript method ends

  22. 22

    How to capture traffic in monitor mode when you know the password

  23. 23

    How to know if there is Internet when using Parse.com Android

  24. 24

    How does my browser know to refresh when I start nginx?

  25. 25

    how to know programmatically when a last call was made to a specific number

  26. 26

    How to know when to put closing tag on nested elements

  27. 27

    How do I know when a new beta CD is released?

  28. 28

    MQTT.js ability to know all subscriber receive publish message

  29. 29

    How to use MQTT over the internet?

ホットタグ

アーカイブ