How to access to retain flag value after received a message with async_receive ?
Hello,
I'm new to this library and to MQTT in general. But I search a lot and don't find any answer to my question.
After receiving a message from my broker I want to check if this one was a retain message or not. I thought that it will exist a manner to access to the retain flag value of the message received but I didn't find anything like this.
Please tell me if I have not be clear enough.
Hello,
Unfortunately, we don't currently forward the retain flag. Adding support for this would likely require changing the async_receive completion signature.
I'm also curious about your use case, since the retain flag is primarily meaningful to the broker.
Hello @biljazovic,
Thanks for your reply, it's clear. I don't really have use case for now because I'm principally discovering the protocol and the lib. I was just wandering if it was possible. But I imagine that a client may process the information differently if it is a retain message.
Have a nice day