Skip to content

When to use message vs subscribe callback method to receive published data ? #1785

Discussion options

You must be logged in to vote

The subscribe callback is called with the subscription result, it tells you if there was an error on subscription or not. The message callback is called everytime a message is received.

Then there is also the client.handleMessage(packet, done) function that can be used to handle messages with backpressure support (the next message that comes is not processed until you call done callback.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@luan-dang-techlabs
Comment options

Answer selected by robertsLando
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
Converted from issue

This discussion was converted from issue #1784 on January 26, 2024 07:46.