what is the whole picture?
The solution has already been implemented. We will upload to git shortly. I will update this post once that's done.
Our needs is to develop a firmware that can connect to a message broker in order to send and receive messages in real time (avoiding "polling").