-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Feature Req] ServiceBusMessageSender should refresh maximum message size when service settings change #43983
Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
Hi @SeanFeldman. Thanks for letting us know. The current implementation is based on the now outdated service limitation that the maximum message size was based on the SKU and was not configurable. As the service feature set changed, this was overlooked in the client. There's a bit of a tricky balance here. I don't think that we want to force every call to Regardless of how the client adjusts, we'd also need a service-side feature for this to work. Currently, the entity does not detatch existing AMQP connections/links when settings change. Since the maximum message size is communicated to the client via metadata on the link, for the client to be aware of changes, it needs to open a new link on which the service has set that updated metadata. I've opened #705 for the Service Bus team. In the meantime, the proposed client changes are safe to make, so we'll look at getting them in. |
@jsquire, that's a good approach 👍 |
Client portions addressed in #44328. It should help a bit, but won't be fully effective until the service forces client disconnection when the size is updated. |
Changes merged and will be available in our next release. |
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: