-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[EH] Set AMQP Client Link Max Message Size to 0 #43462
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request modifies the EventHub AMQP client to set the link maximum message size to 0, effectively removing any default size limit. This allows the server to apply its own internal 20 MB limit instead of having the client impose a potentially smaller limit.
Key changes:
- Introduces a new constant
LINK_MAX_MESSAGE_SIZE = 0
- Updates the SendClient to use this new constant instead of
MAX_FRAME_SIZE_BYTES
for the default max message size
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/constants.py | Adds new constant LINK_MAX_MESSAGE_SIZE = 0 to define unlimited message size |
sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py | Updates SendClient to import and use the new constant for default max message size |
/azp run python - eventhub - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run python - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run python - eventhub - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
This pull request ensures that the EventHub client link max size is set to 0.
This change prevents any default maximum link size from being applied, which is required for proper client behavior in our environment.
The client initiates communication by sending an Attach command to the server, including specific configuration settings. Upon receiving this command, the server processes the information, performs a minimum value calculation based on the provided parameters, and then generates a response that is sent back to the client.
Our change modifies the client-side request to explicitly send a value of 0 for the maximum message size. By doing this, the server interprets the value as “no limit” on the message size. When the server receives this request, it performs its minimum value calculation based on the requested settings. After completing this calculation, the server enforces its internal 20 MB limit on the message size and returns the resulting configuration back to the client.