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

Configured MaxMessageSize is not honoured #1378

Closed
MarcialRosales opened this issue Aug 30, 2023 · 2 comments
Closed

Configured MaxMessageSize is not honoured #1378

MarcialRosales opened this issue Aug 30, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@MarcialRosales
Copy link
Contributor

MarcialRosales commented Aug 30, 2023

Describe the bug

Despite configuring ConnectionFactory.MaxMessageSize, this limit is not applied and instead the .Net client uses the default limit set in ConnectionFactory.DefaultMaxMessageSize (=134217728).

This does not happen in 6.x versions. The reason is because when the ConnectionFactory creates AmqpTcpEndpoint, it uses a constructor which does not take in the parameter maxMessageSize hence it defaults it to ConnectionFactory.DefaultMaxMessageSize. In 6.x, the default value was 0, i.e. unlimited.

Reproduction steps

  1. Configure ConnectionFactory.DefaultMaxMessageSize to 500Mb
  2. Send messages of 500Mb to a queue
  3. Consume messages from that queue
  4. The consumer fails with every single message because all of them are greater than 134217728
    ...

Expected behavior

All messages should be consumed because they are equal to the configured MaxMessageSize.

Additional context

No response

@MarcialRosales MarcialRosales self-assigned this Aug 30, 2023
@lukebakken lukebakken added this to the 6.6.0 milestone Aug 30, 2023
@lukebakken
Copy link
Contributor

Double-check that we're not hitting the RabbitMQ limit. I forget what the max size is by default.

@lukebakken lukebakken self-assigned this Aug 30, 2023
MarcialRosales added a commit that referenced this issue Sep 1, 2023
Update ConnectionFactory.DefaultMaxMessageSize
to today's RabbitMQ max message size
@MarcialRosales MarcialRosales mentioned this issue Sep 1, 2023
5 tasks
MarcialRosales added a commit that referenced this issue Sep 1, 2023
@lukebakken
Copy link
Contributor

@MarcialRosales @michaelklishin I will back-port this to the 6.x branch.

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

No branches or pull requests

2 participants