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

[FEATURE REQ] Batch.TryAdd could respect 100 items limit when used with SendVia #37216

Open danielmarbach opened 1 year ago

danielmarbach commented 1 year ago

Library name

Azure.Messaging.ServiceBus

Please describe the feature.

Related https://github.com/Azure/azure-sdk-for-net/issues/21451 and https://github.com/Azure/azure-sdk-for-net/pull/19125

Currently, when transactions across entities are used, the TryAdd method does allow adding more items to the batch than the service can handle.

The current service restriction is 100 items per transaction.

I realize this might be very tricky to improve, and potentially not even possible without actually calling the service and the service returning the maximum number of items per transaction. I also haven't done any investigations if it is even possible to discover on the client-side the number of transaction enlistments from potentially multiple batches.

Yet, I want to raise this as a discussion item to explore if there is anything that could be done, similar to whether it is possible to improve the maximum number of items that can ever be sent within a batch depending on the tier.

jsquire commented 1 year ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.

JoshLove-msft commented 1 year ago

Thanks for filing this @danielmarbach. You are correct that we would need some sort of service support to add validation here as we try to avoid hard-coding limits on the client. I think you have linked the correct issue - https://github.com/Azure/azure-sdk-for-net/issues/21451, as the setting for the max messages in a transaction could be included as part of the same set of Link Settings as the setting for overall max messages. I am going to mark this issue as Service Attention and also add a comment to the linked issue.

github-actions[bot] commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @shankarsama @DorothySun216 @EldertGrootenboer @saglodha.

EldertGrootenboer commented 11 months ago

We have assigned an engineer to look further into this issue. We will update this issue when we have more information.

EldertGrootenboer commented 4 months ago

Thank you for your feedback. We have brought this item in our current planning, and should be able to provide an update in the coming months.