MQTT lose topic subscription

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQTT lose topic subscription

347 Views
ping1
Contributor V

Dear All

My MQTT application loses subscription after working for some time, connection is still there, and another topic still responses, just 1 or 2 topic are lost, I wonder whether there is any way I can tell when it is lost, the call back function mqtt_topic_subscribed_cb() doesn't give me any error indication.

Thank you.

Ping

0 Kudos
Reply
2 Replies

306 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
I hope you are well.

Unfortunately, there is no way to tell if the topic is disconnected. After some publish fails you could call the subscribe topic function so we guarantee that it is connected.

Best regards,
Omar

0 Kudos
Reply

300 Views
ping1
Contributor V

Hi, Omar

Thanks for reply.

The issue for my side (as a client) is  - my publish is still working, can be received by the broker, however, when broker try to publish something to me, I don't receive it as I lost subscription to that topic for some reason, I tried to do re-subscription manually, and then it start to receive. 

I wonder what is the possible reason for a subscribed topic loss and how can I know it is lost.

Regards!

Ping

0 Kudos
Reply