Skip to content
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

bridge: lost outgoing messages with clean_session=true and local_clean_session=false #2604

Closed
kervel opened this issue Aug 4, 2022 · 1 comment
Labels
Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Milestone

Comments

@kervel
Copy link

kervel commented Aug 4, 2022

running on mosquitto 2.0.11

situation: local mosquitto bridges outgoing messages to remote mosquitto. also some incoming messages but the incoming messages are not important and don't have to be persisted, only the outgoing. the "remote" mosquitto is actually multiple mosquitto's running in failover without shared state so sessions cannot be persisted on the remote side reliably (each replica is also running a kafka connect instance). However, i don't want to loose local outgoing messages.

so, i set clean_session to true (so that the remote broker doesn't have to queue messages for the local one) but local_cleansession to false (because i don't want to loose outgoing messages).

however, i still seem to loose outgoing messages. When connectivity drops, i see mosquitto.db growing as expected, and if connectivity resumes, all queued messages are sent out. But when i restart mosquitto, the mosquitto.db seems to get emptied.

@ralight
Copy link
Contributor

ralight commented Aug 13, 2022

Thanks for the report and nice explanation. I've found the cause and pushed a fix to the fixes branch if you wish to try it out. I intend to release it as part of 2.0.15 on Monday.

@ralight ralight added this to the 2.0.15 milestone Aug 13, 2022
@ralight ralight added Type: Bug Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. labels Aug 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants