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

rumqtt: Serialization/deserialization error: Max Payload size has been exceeded #884

Open
kevchi9 opened this issue Jul 1, 2024 · 3 comments

Comments

@kevchi9
Copy link

kevchi9 commented Jul 1, 2024

I can face this issue when I try to read messages on a topic as subscriber, but I can publish them without any problem.
I am also able to read these messages from another subscriber client (e.g. mosquitto subscriber).

I solved this by increasing the max packet size ( set_max_packet_size(MAX_SIZE) ) , in my case the issue happened because the packet was 10791 bytes and the default limit is 10240.

The weird thing is that the error can be encountered with the default configuration, but only as a subscriber.

The messages are json like strings so they have variable length.

@swanandx
Copy link
Member

swanandx commented Jul 1, 2024

max incoming packet size and max outgoing packet size can be different, and hence it's possible that only incoming packets ( i.e. subscribers ) cause the error.

Can you provide with more information like which version are you using ( like v5? ) to confirm?

@kevchi9
Copy link
Author

kevchi9 commented Jul 2, 2024

I'm using v5. Tried with v3 too and had the same issue. So the default packet max sizes are different?

@swanandx
Copy link
Member

swanandx commented Jul 3, 2024

iirc, broker sends max packet size it can accept in connack and then client adheres to it for max outgoing size.

For v3, to start with we are setting max sizes same ( for both incoming and outgoing ), so not sure, can you share some minimal poc / code to reproduce the behaviour if possible?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants