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

MQTT 5 / mosquitto_sub / unexpected Recive Maximum Property #2612

Closed
JSchy65 opened this issue Aug 12, 2022 · 4 comments
Closed

MQTT 5 / mosquitto_sub / unexpected Recive Maximum Property #2612

JSchy65 opened this issue Aug 12, 2022 · 4 comments

Comments

@JSchy65
Copy link

JSchy65 commented Aug 12, 2022

mosquitto_sub client version 2.0.14 (Ubuntu 20.04)

The CONNECT Properties contain an unexpected Recive Maximum Property value.

mosquitto_sub -p 1883 -q 1 -t test/# -c -i abc123 -x 30 -D connect maximum-packet-size 1000000 -d

CONNECT Properties:
0d 27 00 0f 42 40 11 00 00 00 1e 21 00 14

maximum-packet-size (27) and session-expiry-interval (11) are set as expected.

But there is also a Recive Maximum (21) property set to 14hex even it was not explicitely set within the command.
The MQTT 5 Specification says in chapter 3.2.2.3.3 that the default value for the receive maximum is 65535.
Is it intendet to set it to 14hex ??

By the way:

In my oppinion, it would be very helpful to explicitely state in the mosquitt_sub manual that the -x option alone has no effect and
that it must be combined with a -D property to get any effect. I lost hours to find that out.

The note "Applies to MQTT v5 clients only" is a litte bit to hided :-)

Anyway, that -x in my opinion is not a good idea. "-D connect session-expiry-interval" would be the right way.
But then you get that "Error in CONNECT properties: Duplicate property in property list".

My recommendation here is to fix that "duplicate property" problem and forget that unlucky -x.

Thank You very much, Regards
Joachim Schachermayer

@ralight
Copy link
Contributor

ralight commented Aug 12, 2022

-x - I've changed this to enable MQTT v5.0 mode if it is used. I won't be getting rid of the option, it's an important one so should be easily accessible.

receive-maximum is set to a sensible default by the client, if you don't otherwise set it.

@JSchy65
Copy link
Author

JSchy65 commented Aug 17, 2022

To set the receive-maximum to that small value is intentendet as I understood yor answer . Thats fine for me. I only wanted to make sure that it was intended and not by error.

@JSchy65
Copy link
Author

JSchy65 commented Aug 17, 2022

If the -x enables the MQTT v5.0 mode, that is a really great idea I like very much.

But I have retested with 2.0.15 now and the behaviour of the mosquitto_sub is the same like before. That means that the -x alone is not enabling the MQTT v5.0 mode.

From the GIT Insights Network Graph I found, that the commit e5cb3d0 from 12. Aug. implements that but still exists only in the develop branch and was not taken over to the master and/or fix branch. This is a pity ;-)

Hopefully, one day that commit will also find its way into a release :-)

@ralight
Copy link
Contributor

ralight commented Apr 10, 2023

I don't like to change behaviour across bug fix releases where possible, so the -x behaviour won't change until 2.1. I believe everything else is addressed, so I'm closing this issue.

@ralight ralight closed this as completed Apr 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants