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

new bridge config: something like bridge_reconnect_no_clean_session #601

Open
wiebeytec opened this issue Oct 30, 2017 · 9 comments
Open
Labels
Component: mosquitto-broker Status: Blocked Another issue needs to be resolved first

Comments

@wiebeytec
Copy link

wiebeytec commented Oct 30, 2017

Mosquitto has the cleansession option for a bridge configuration. But, would it make sense to also have something like bridge_reconnect_no_clean_session = true? This would obviously only apply to reconnects while Mosquitto is active.

I'm running into the issue that QoS messages are not delivered after a reconnect for a bridge that is configured as cleansession true. But, I can't set the whole bridge to cleansession false. One reason being, is that I don't want QoS messages from yesterday, last week, or last year.

What complicates matters, is that the standard doesn't allow for an expire time on QoS messages. Otherwise setting cleansession to false would be easier (though still hard in our case).

@toast-uz
Copy link
Contributor

You said the QoS messages "generated BEFORE a reconnect for a bridge" were not delivered AFTER that on cleansession true? It seems normal.

@wiebeytec
Copy link
Author

You said the QoS messages "generated BEFORE a reconnect for a bridge" were not delivered AFTER that on cleansession true? It seems normal.

Indeed it does. It's not a bug report, but a discussion / feature request.

The point is that you can't have QoS without also getting retained messages and subscriptions for free, which may be undesirable.

@toast-uz
Copy link
Contributor

I understood that you agreed the current behavior of cleansession is right, and need something else to solve your situation. Right?

@wiebeytec
Copy link
Author

Well, I think the clean session should be different for a reconnect than a connect. As I said, otherwise you can't use QoS without also getting retained values and subscriptions, always.

@karlp
Copy link
Contributor

karlp commented Nov 16, 2017

Are you missing the retained flag on messges received are only received for messages that are published because they were retained, vs publishes that are "fresh" ?

@wiebeytec
Copy link
Author

Sorry, could you maybe edit that :)? I don't quite get it.

@toast-uz
Copy link
Contributor

New MQTTv5 Publication Expiry Interval may solve your issue in the future.
http:https://docs.oasis-open.org/mqtt/mqtt/v5.0/csprd01/mqtt-v5.0-csprd01.html#_Toc489530135

@toast-uz
Copy link
Contributor

toast-uz commented Mar 2, 2018

@wiebeytec will you wait for MQTTv5, or do you propose any specific change on current mosquitto?

@toast-uz toast-uz added Component: mosquitto-broker Status: Blocked Another issue needs to be resolved first labels Mar 2, 2018
@wiebeytec
Copy link
Author

We worked around it for now (by doing manual retries), but the fact that you can't have QoS without also forcing retained messages and subscriptions on you, seems a conceptual problem.

However, is it non-standard and therefore undesirable to implement the bridge_reconnect_no_clean_session? When it comes to retained messages, Mosquitto already has non-standard options, but I can't make this call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: mosquitto-broker Status: Blocked Another issue needs to be resolved first
Projects
None yet
Development

No branches or pull requests

3 participants