Repository navigation
[EventHub][ServiceBus] Do not announce a 1 MB max message size on pyAMQP receiver links - #50071
GhostPratt wants to merge 2 commits into
Conversation
…MQP receiver links The sender link already sends 0 (no limit) since Azure#43462 and Azure#43383. Azure#42814 asks for the receiver link to match.
|
The |
|
Thank you for your contribution GhostPratt! We will review the pull request and get back to you soon. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 7 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the receiver-link default change, though dedicated-cluster validation of large-message delivery remains outstanding.
No open issues 🎉
What changed in this PR
Aligns the vendored pyAMQP receiver links in Event Hubs and Service Bus with sender links by advertising 0 (no limit) instead of 1 MB. This advances #42814; dedicated-cluster validation of large-message delivery remains outstanding.
Changes:
- Updates receiver defaults while preserving explicit message-size overrides.
- Adds sync/async tests for link settings and Event Hubs batch sizing with mocked 20 MB limits and the 1 MB fallback.
- Adds internal Chronus entries for both packages.
| File | Description |
|---|---|
sdk/servicebus/azure-servicebus/tests/unittests/test_pyamqp_client_max_message_size.py |
Tests sync/async sender and receiver link defaults and overrides. |
sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/client.py |
Defaults receiver links to no advertised message-size limit. |
sdk/eventhub/azure-eventhub/tests/unittest/test_producer_max_message_size.py |
Tests negotiated batch limits, large payloads, and fallback sizing. |
sdk/eventhub/azure-eventhub/tests/unittest/asynctests/test_producer_max_message_size_async.py |
Adds equivalent async batch-sizing coverage. |
sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_client_max_message_size.py |
Tests sync link defaults and overrides without live-service fixtures. |
sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/asynctests/test_client_max_message_size_async.py |
Adds equivalent async link-setting coverage. |
sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py |
Defaults receiver links to no advertised message-size limit. |
.chronus/changes/servicebus-receiver-link-max-message-size.md |
Records the Service Bus consistency change as internal. |
.chronus/changes/eventhub-receiver-link-max-message-size.md |
Records the Event Hubs consistency change as internal. |
Review effort: Balanced
Eldert Grootenboer (EldertGrootenboer)
left a comment
There was a problem hiding this comment.
The change looks good to me.
As a non-blocking follow-up, we could add tests that assert a literal 0 on the actual ATTACH frame, plus an explicit finite override, for both packages' sync/async receivers? The current tests mock link creation and compare against LINK_MAX_MESSAGE_SIZE, so a regression in that constant or frame construction could slip through.
… ATTACH frame The existing tests stop at the mocked link creation and compare against LINK_MAX_MESSAGE_SIZE, so they would not catch the constant changing.
|
Eldert Grootenboer (@EldertGrootenboer) good point, I added it. |
Description
The vendored pyAMQP
ReceiveClientin azure-eventhub and azure-servicebus still put a 1 MB max message size on its ATTACH frame. This switches its default toLINK_MAX_MESSAGE_SIZE(0, no limit), which the sender link has used since #43462 and #43383, so both links match. Part of #42814.Some things worth knowing:
internaland don't claim a fix.create_batchwith that 20 MB answer and the 1 MB fallback when the service sends none.amqpproxyfixture with a no-op. Without that they'd be skipped whenever no live Event Hub is configured.The behavior change is the one line in each
_pyamqp/client.py. TheReceiveClient.__init__blocks of the two packages are still identical. The rest is tests and the two Chronus entries.Still open: this hasn't run against a real dedicated cluster. #42814 asks for sending and receiving single events and batches above 1 MB, and someone with a dedicated cluster needs to check that end to end before the issue is closed.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines