[Feature Req] ServiceBusMessageSender should refresh maximum message size when service settings change #43983
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
feature-request
This issue requires a new behavior in the product in order be resolved.
needs-team-attention
This issue needs attention from Azure service team or SDK team
Service Bus
Milestone
Library name and version
Azure.Messaging.ServiceBus
Describe the bug
When using a
ServiceBusMessageSender
instance while there's a change to the entity's maximum message size, the Batch API doesn't allow message adding despite the message being within the allowed size. The client holds on to the old maximum message size it has retrieved from the entity, which is confusing.Expected behavior
Messages that previously couldn't be sent to be sent w/o the need to restart the process.
Actual behavior
The process has to be restarted to get the updated max message size.
Reproduction Steps
On a premium namespace, a queue of size S1. Start a process that sends a message larger than S1.
Increase the entity maz size to S2 (S2 > S1). Adding messages to a batch
messageBatch.TryAddMessage(message)
be unsuccessful.Environment
No response
The text was updated successfully, but these errors were encountered: