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

message_size_limit should block incoming messages exceeding that limit #265

Closed
alepez opened this issue Sep 14, 2016 · 6 comments
Closed
Labels
Component: mosquitto-broker Type: Enhancement A new feature for a minor or major release.
Milestone

Comments

@alepez
Copy link

alepez commented Sep 14, 2016

Start a broker with option message_size_limit set to 512
Publish a message of 10MB

Expected:

Broker stop handling the message when 512 bytes of payload has arrived, then drop the message.

Actual:

Broker receives 10MB of data, then drop the message. Process' memory usage increase of at least 10MB.

@karlp
Copy link
Contributor

karlp commented Sep 14, 2016

it has to receive the message to drop it. The remote client is still sending that data, you've got to swallow it, or disconnect the client.

@alepez
Copy link
Author

alepez commented Sep 14, 2016

I guess there isn't any option to make the broker to disconnect clients not respecting payload size, am I right?

@ralight
Copy link
Contributor

ralight commented Sep 20, 2016

You are correct, but actually this should be possible in 1.5.

@ralight ralight added this to the 1.5 milestone Oct 2, 2016
@ralight ralight added Type: Enhancement A new feature for a minor or major release. Component: mosquitto-broker labels Oct 2, 2016
@jamesmyatt
Copy link

I assume that currently messages that exceed message_size_limit will just be swallowed. Is this correct?

If you're going to disconnect clients for exceeding message_size_limit, then you also need an option to prevent a bridge from sending messages that exceed the limit too, e.g. bridge_outgoing_message_size_limit.

@ralight ralight modified the milestones: 1.5, 1.6 Aug 16, 2018
@ralight
Copy link
Contributor

ralight commented Aug 16, 2018

I'm bumping this to 1.6 as it got mised in 1.5, sorry for that.

@ralight
Copy link
Contributor

ralight commented Sep 4, 2019

max_packet_size was added in version 1.6. Bridge control will be in 1.7.

@ralight ralight modified the milestones: 1.6, 1.7 Sep 4, 2019
ralight added a commit that referenced this issue Oct 27, 2020
@ralight ralight modified the milestones: 1.7, 2.0 Oct 27, 2020
@ralight ralight closed this as completed Dec 1, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: mosquitto-broker Type: Enhancement A new feature for a minor or major release.
Projects
None yet
Development

No branches or pull requests

4 participants