Azure / azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
https://azure.microsoft.com/services/service-bus
MIT License
580 stars 775 forks source link

[Feature Req] Disconnect links when maximum message size changes #705

Open jsquire opened 1 month ago

jsquire commented 1 month ago

Problem statement

When using a ServiceBusMessageSender instance while there's a change to the entity's maximum message size, the Batch API is unaware of the change and doesn't allow messages to be added 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.

This occurs because the maximum message size is communicated to the client via property on the AMQP link when it is established. If the maximum message size for the entity changes, any links that were already opened have the wrong metadata associated with them.

Requested feature

When changes are made to entity settings that would impact how the client interacts with the service, the service should force-detatch existing AMQP links and/or connections to ensure that the client must establish a new one with the latest service metadata.

References and related

jsquire commented 1 month ago

//cc: @EldertGrootenboer

SeanFeldman commented 1 month ago

Cheering for this to happen in 2024 🤞

EldertGrootenboer commented 1 month ago

Thank you for suggesting this feature. We have opened an investigation task for this in our backlog, and will update this issue when we have more information.