Closed michalkorecki closed 1 year ago
instead of providing a messagebatcher interface. Can you implement this logic directly into the DispatchSender class ?
instead of providing a messagebatcher interface. Can you implement this logic directly into the DispatchSender class ?
Intention behind IMessageBatcher
was to allow caller to know batches composition before dispatch is called (which might be in two different processes), so I'd prefer to keep it public. IMO replacing DispatchSender
current batching logic with IMessageBatcher
would be the most beneficial: size limit bug will be fixed and grouping code will be consolidated. Thoughts?
The requirement behind this code is too specific, to be a valuable addition on this nuget
Adds
IMessageBatcher
which splits incoming message set into batches, each of which can be later sent as single ASB API call. Batching usesServiceBusMessageBatch
internally to split basing on maximum allowed message size (256k for standard tier ASB) or message count hard-limit per transaction (100).IMessageBatcher
can be also used to go around a bug inDispatchSender
, where message partitioning does not take size limit into account. Bug can be replicated withExamples/send_40x7k_nonbatched.js
fetch API call (assumes standard ASB tier).