Skip to content
Discussion options

You must be logged in to vote
  1. Does a long-running messageArrived callback block the internal network thread?

Yes.

  1. If the callback takes too long, can this delay keep-alive pings or acknowledgements long enough to trigger a disconnect?

Yes.

  1. Is there a recommended maximum processing time for callbacks?

Not really; it depends on the requirements for your application, but the general recommendation is: finish as quickly as possible and don't block. In particular, it's ok to initiate another asynchronous MQTT operation from within a callback, but don't block waiting for it to complete. That will result in a deadlock.

But also keep in mind the answer to the previous question.

  1. If long processing is expected, is…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Tidalikk
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