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
Keep messages on bridge configuration reload #2567
Comments
Thanks for the report, I'm looking into this and know what the problem is - I'm not sure the best way to fix it at the moment though. |
Hi @phlundblom ! I have the same issue, do you found a better workaround ? Thanks |
Unfortunately not. I assume it's not that hard to fix and submit a PR but haven't come to it because we are currently redesigning our setup and I'm not sure what role Mosquitto will have in the new one. |
I thought I finally had a way to use Mosquitto as a bridge between local client and Google Cloud Platform IoT Core, thanks to some helpful hints here. Unfortunately I have run into a problem, again.
Setup
What I want to achieve
During a network outage, I want Mosquitto to cache all messages and when connection to IoT Core MQTT bridge is re-established, the messages should be sent.
What I see
Unfortunately the IoT Core MQTT bridge requires the client to re-authenticate with an updated JWT (set as password) periodically. As of now, I do this by updating the
remote_password
property in the Mosquitto configuration fil and then send a SIGHUP to the process. This is all and well when the network is up and no local messages are cached by Mosquitto. If instead, the connection to IoT Core is down and local messages are cached, it seems they all will be thrown away as soon as Mosquitto identifies a configuration change for the bridge.I can see the point of flushing saved messages for a bridge if there is a configuration change. Unfortunately it results in dropped messages in my use case. I also tried to use
bridge_reload_type lazy
but the end result is the same, probably because of the changed password.Question
Is there a way to change the
remote_password
for a bridge without Mosquitto flushing all cached messages for the bridge upon re-connection after the password change?The text was updated successfully, but these errors were encountered: