-
Notifications
You must be signed in to change notification settings - Fork 1.2k
MQTT: Resubscribe after a reconnect #3452
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
Conversation
clang-format issues are outside the code parts affected by this change so they won't fit this PR very well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you very much for your PR! I think introducing a wrapper around mosquitto_subscribe()
makes the code unnecessarily verbose. What do you think?
Best regards,
—octo
Just put those cosmetic fixes in a separate commit – the check doesn't negotiate ;) |
Thanks for your quick review Florian, will add a comment fixing the clang-format reported things in a respin. |
After losing our connection to a MQTT broker our subscription will be gone, too, so we need to subscribe to our topic once again after reconnecting, otherwise collectd will not receive any MQTT messages anymore. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
This is an automated code style fix generated by running "contrib/format.sh src/mqtt.c". No functional change intended. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @maciejsszmigiero!
After losing our connection to a MQTT broker our subscription will be gone, too, so we need to subscribe to our topic once again after reconnecting, otherwise collectd will not receive any MQTT messages any more.
ChangeLog: MQTT plugin: Resubscribe after a reconnect
Fixes: #3442