Closed nneul closed 1 week ago
process anything pending in receive queue and then exit
If I'm understanding you correctly then this is not something the MQTT protocol really supports (there is no way to ask the server to send all waiting messages and then disconnect). All you can really do is connect and wait until you believe you have all of the messages (possibly due to a timestamp within the message body, or timing out when, for example, no messages are received in a second).
max_inflight_messages_set()
relates to outbound messages (and only relates to the connection between the client and the server).
If the above answers your question then please close off this issue, otherwise please provide further information re your requirements (but, perhaps, stackoverflow might be a better venue as this seems likely to be a protocol question rather than something specific to this library).
Closing as I believe that this was a question which has been answered.
The main doc page has this notation:
Is there any example of how to do the equivalent of this pseudocode?
Essentially I just want to "process anything pending in receive queue and then exit".
I have tried max_inflight_messages_set(), but that doesn't appear to change any behavior for received messages.