-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message Poller #109
Comments
You can call the next async_mqtt/tool/client_cli.cpp Lines 808 to 851 in 984e81f
It uses stackless coroutine. If you use callback approach, then call recv() the last part of recv() callback instead of the loop. NOTE: It is not a polling, it is still event driven. |
If you still have the problem, feel free to reopen the issue. |
Thank you for the quick response. |
Hello,
Sorry for the intrusion.
Just wondering what would be the best way to implement a polling mechanism (after having subscribed to a topic) that would trigger a callback whenever a new message is received.
So far I only found examples that would receive a single message and then disconnect from the broker.
I need to implement an endpoint that would maintain a connection with the broker and that would permanently subscribe to a specific topic and keep receiving messages on said topic.
Thanks in advance.
Elia
The text was updated successfully, but these errors were encountered: