Skip to content

Does Paho MQTT Asynchronous C Client Buffer Received Messages? #1381

Answered by icraggs
LaneLutgen asked this question in Q&A
Discussion options

You must be logged in to vote

The application shouldn't spend much time in any of the callbacks, including messageArrived. In general that means no blocking operations. There is a message queue for outbound messages, but not for those inbound. When the messageArrived callback is running, some of the internal client library operations will be blocked - for instance any other call to messageArrived.

You can return 0 from the messageArrived callback, indicating a failure, and the callback will be reinvoked. But this is not very efficient, and is only intended for error situations.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by icraggs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants