# MQTTAgent\_Publish callback timeout

**URL:** <https://forums.freertos.org/t/mqttagent-publish-callback-timeout/17353>\
**Category:** Libraries\
**Created:** [May 3, 2023, 7:43pm UTC](https://forums.freertos.org/t/mqttagent-publish-callback-timeout/17353 "2023-05-03T19:43:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schoeler](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/schoeler/32/1422_2.png) [@schoeler](https://forums.freertos.org/u/schoeler)\
**Post date:** [May 3, 2023, 7:43pm UTC](https://forums.freertos.org/t/mqttagent-publish-callback-timeout/17353/1 "2023-05-03T19:43:30Z")

</div>

If a call to MQTTAgent\_Publish return MQTTSuccess, how long should our task wait for the callback to be executed. What is the upper bound on this time?  
Thanks

---

<div class="post-metadata">

**Author:** ![Shub](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@Shub](https://forums.freertos.org/u/Shub)\
**Post date:** [May 4, 2023, 1:50pm UTC](https://forums.freertos.org/t/mqttagent-publish-callback-timeout/17353/2 "2023-05-04T13:50:07Z")

</div>

HI,  
Can you check these 2 threads. They might give you some idea:

1. [MQTTAgent Publish is slow as compare to FreeRTOS MQTT - #20 by txf](https://forums.freertos.org/t/mqttagent-publish-is-slow-as-compare-to-freertos-mqtt/15559/20)
2. [https://forums.freertos.org/t/mqtt-agent-publish-slow-and-causes-incoming-callbacks-to-slow-as-well/16747/](https://forums.freertos.org/t/mqtt-agent-publish-slow-and-causes-incoming-callbacks-to-slow-as-well/16747)
