ray Posted September 23, 2021 Report Share Posted September 23, 2021 Hi there. Let's see if someone can help me. I have this scenario: - Raspberry pi with mosquitto broker. - Unistream connected to the broker and subscribed to a topic - Several temperature sensors as clients publishing a topic every 1 second. Everything works fine but, any idea how to know if a client has disconnected? In the client configuration I have the "keep alive" function set to 10 seconds, however the "Subscription.Subscribed" bit is always at "1". Link to comment Share on other sites More sharing options...
NoamM Posted September 26, 2021 Report Share Posted September 26, 2021 Dear ray, If the "Subscription.Subscribed" bit is at "1" from UniStream POV you are connected. Please check: Set the "Broker.LastWillTopic" & "Broker.LastWillMessage" properties on the Broker linked to your Subscription and validate you are getting the last will message 10s after the disconnection. It will help us to know if the UniStream get the disconnection event What is the value of "Broker.BrokerConnected" on the Broker struct linked to your Subscription 10s after the disconnection? Is it also "1"? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now