Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.26k stars 4.6k forks source link

[Service Bus] Apply link metadata for the maximum message batch size #44914

Open jsquire opened 2 months ago

jsquire commented 2 months ago

Problem statement

When large message support is enabled, the standard message size limit is still applied to batched messages. At the time of writing, the Service Bus service rejects any batch larger than 1MB regardless of the configured maximum message size. Because the service communicates only the maximum message size allowed by the AMQP link, the client library is unable to set the actual limit on the batch, allowing developers to create batches that can never successfully be sent.

There is an open request for the service to add a new link property that exposes the maximum message batch size on an AMQP link so that callers can dynamically discover the service limits.

Current work-around

The constructor for AmqpSender is currently hardcoding the 1mb limit in order to ensure that the client library does not allow callers to create batches which cannot be successfully published.

Scope of work

Success criteria

References and related

jsquire commented 2 months ago

depends on #708