MQTT Agent Publish slow and causes incoming callbacks to slow as well


Working on an AWS IoT Core project using STM32 U5 with RS9116W. Using socket calls, not the MQTT client in the RS9116W. We are using coreMQTT Agent v1.0.0.

The problem I am seeing is that when using thread safe MQTTAgent_Publish(), I see a significant slowdown in publish and callback response to incoming messages. Upon starting up and connecting to AWS, incoming traffic arrives immediately (callback fires as expected) but as soon as I publish once, the message arrives at the broker very slowly, sometimes up to 10 seconds, and then incoming traffic begins to be delayed by up to 20 seconds. This doesn’t happen if I call MQTTAgentCommand_Publish() directly.

I have tried increasing task priority and stack depth. Help appreciated!


Is this applicable to you as well - MQTTAgent Publish is slow as compare to FreeRTOS MQTT - #20 by txf

We fixed this problem by upgrading to the latest core-mqtt-agent library.



Thank you for reporting back.