Thanks for the replies Christian Beier
Alessanddro
I will just add a bit more context to using standard Paho libraries. Azure IoT Hub is not a MQTT broker. Whilst it talks MQTT, it has a few nuances as Christian has mentioned, such as a strict message format, TLS and more. I authored this post as I ran in to so many challenges trying to communicate with standard MQTT (Paho). In order to meet my needs I did need to use the SDK.
If you have devices transmitting telemetry, my recommendation would be to see if you can pivot to transmitting with a SDK versus standard MQTT. If your sensors are connected to a MCU, Azure IoT Hub provides support for ESP, STM and more devices.
If you can tell me more about the devices that are sending messages, I would be happy to try and help you find a solution.
Shane