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

Server channel_max is not respected #939

Closed
baelter opened this issue Feb 10, 2025 · 0 comments · Fixed by #940
Closed

Server channel_max is not respected #939

baelter opened this issue Feb 10, 2025 · 0 comments · Fixed by #940

Comments

@baelter
Copy link
Member

baelter commented Feb 10, 2025

Describe the bug
The server sends channel_max in the Tune frame, which is defined as:

Specifies highest channel number that the server permits. Usable channel numbers are in the range 1..channel-max. Zero indicates no specified limit.

The client responds with channel_max in the TuneOk frame, which is defined as:

The maximum total number of channels that the client will use per connection.
If the client specifies a channel max that is higher than the value provided by the server, the server MUST close the connection without attempting a negotiated close. The server may report the error in some fashion to assist implementors.

The spec also includes assertions that the client can't specify a value larger that the server:

<assert check="notnull"/>
<assert check="le" method="tune" field="channel-max"/>

This is also mentioned in RabbitMQs documentation:

The lower value of the two is used: the client cannot be configured to allow for more channels than the server configured maximum

https://www.rabbitmq.com/docs/channels#channel-max

LavinMQ currently just accepts the value the client sends in TuneOK

@channel_max = tune_ok.channel_max

Describe your setup
Please describe the environment you are using, e.g. LavinMQ version, operating system, client software.

How to reproduce
Only verified by reading the code so far, we should create a spec

Expected behavior
The client should not be able to set a value higher that what the server suggests

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

Successfully merging a pull request may close this issue.

1 participant