Hi @EyalG,
Since you’ve stated you want to handle both Shadow and OTA on the same connection, and it sounds like you want to use separate tasks, I would recommend using the MQTT Agent. The MQTT agent is also more similar to the prior MQTT implementation, since it allows an MQTT connection to be shared amongst multiple tasks. So, it might be easier to port your existing application to the agent.
With that said, the main benefit of the agent code is to allow multiple tasks to use the same MQTT connection. If you do not need to use separate tasks in your application for shadow and OTA, and no other tasks will be using that MQTT connections, then you can just use coreMQTT directly, and it may even be simpler to do so for that case. It depends on your application if a single threaded approach will work or not.
Does this answer your question?