Community news, upcoming events and general discussions
Threads: 34 Posts: 86
Get technical support from the community
Threads: 1277 Posts: 7040
Threads: 16 Posts: 58
Tell us how to make XDK better!
Threads: 35 Posts: 117
Share and discuss community member projects
Threads: 72 Posts: 318
I am working with the SendDataOverMQTT project that comes with the XDK workbench 3.5.0(unmodified), and a seperate project that I have modified. Both use the same basic structure for publishing and subscribing messages to the broker.hivemq.com MQTT Broker. Both of them stop after exactly 128 messages have been published and subsequently received.
Is there a limitation in the code that is causing this to stop after exactly 128 messages? I have tried to increase the stack size for the AppControllerFire task and the mess with the publish rate, but neither of those had an effect.
Is there a way to monitor the connection to the MQTT Server and reconnect if it fails? I can see the MQTT event handles track this but would like to call an API rather than edit the SDK.
Thank you for your help,
Thanks for this answer. I didn't think about the limitation being on the broker itself.
One follow up question. Is there a way for the user application to monitor the status of the MQTT connection? In the past I know this could be lost while the XDK stayed connected to the WiFi, so it would be good to monitor this and reconnect if that connection is lost. I see the MQTT API monitors the connection status, but this is monitored with a local variable in the API, so it is not availabel to the User Application. As always I know how to get it to work by changing the SDK but prefer not to do this.
Thanks again for your help.
Thanks as always for your great help. I will look into this lower level code and see if I can implement something to monitor the connection.