# How to get MQTT disconnected callbacks in an application based on the Shadow demo (202011)

**URL:** <https://forums.freertos.org/t/how-to-get-mqtt-disconnected-callbacks-in-an-application-based-on-the-shadow-demo-202011/11341>\
**Category:** AWS\
**Created:** [December 13, 2020, 6:35pm UTC](https://forums.freertos.org/t/how-to-get-mqtt-disconnected-callbacks-in-an-application-based-on-the-shadow-demo-202011/11341 "2020-12-13T18:35:02Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![EyalG](https://avatars.discourse-cdn.com/v4/letter/e/b782af/32.png) [@EyalG](https://forums.freertos.org/u/EyalG)\
**Post date:** [December 21, 2020, 3:38pm UTC](https://forums.freertos.org/t/how-to-get-mqtt-disconnected-callbacks-in-an-application-based-on-the-shadow-demo-202011/11341/10 "2020-12-21T15:38:02Z")

</div>

Thanks for that explanation.  
So if I’m standing now in a point where I’m porting my existing product FW that is based on 202002 to 202012 and I don’t want to restructure the code again in a month or so then should I use the FreeRTOS-Plus-MQTT as it is in the MQTT agent demo and upgrade it when it will be ready or should I use the core MQTT directly (that is using MQTT\_ProcessLoop)?

---

_[View the full topic](https://forums.freertos.org/t/how-to-get-mqtt-disconnected-callbacks-in-an-application-based-on-the-shadow-demo-202011/11341)._
