-
Notifications
You must be signed in to change notification settings - Fork 16
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
Respect server "Retain Available" #137
Comments
Won't the server then just set a PUBACK Reason Code? |
Based on this analysis, we don't get a PubAck, we get an immediate Disconnect in the best case, which could result in a connect -> pub -> disconnect cycle for firmware. |
Ack. The question is still whether we need to enforce this at the library level. |
Yeah, I agree here. Closing this as unnecessary |
Doesn't the argument above (#137 (comment)) also apply to #136, #134, #135? |
This is somewhat of an interesting point. I guess the downside of not being proactive is that we may cause the user to be unexpectedly disconnected from the broker, whereas if we are proactive we can prevent that. I'm not certain that we will be able to provide meaningful error codes outside of MQTT session resets if we hit some of these edge cases, which may result in a bad user experience. |
Being proactive also involves creating new error codes, increasing the number of error-paths. And as mentioned, in practice the application likely depends on certain QoS, packet size, and rates and have no choice other than to behave as it would on session resets: not work/crash/break. |
Yeah. I was thinking about this as well. I don't think a reasonable user application would proactively have error handling paths for QoS-too-high. I think ideally, we may have the capabilities to auto-downgrade i.e. QoS.
I don't think this is true. For example, the Miniconf MQTT client uses QoS levels, but doesn't strictly need them. It would work just fine without them, and we would be fine if the QoS got downgraded. A user application may use miniconf, but not actually care about QoS levels at all. |
Agreed. |
Yeah, I think the solution would be an opt-in by the application if they know they don't care about QoS. I'll open an issue for it. Will take a look at the other parameters if they matter, but things like "retain" and "max packet size" we may just opt for having the server disconnect us. |
The server may indicate if it does not support retained messages. If this is the case, we should not permit transmission of retained messages.
The text was updated successfully, but these errors were encountered: