You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
The EnqueueAsync method has overloads that support sending an IEnumerable<T> as well as sending a single object of type T.
If the calling code sends a List<T> instead of an IEnumerable<T>, the wrong overload will be picked and the queuing abstraction will send a single message with the serialized list within it, whereas the intent is for a batch of many messages to be sent.
We should see how we can improve the API to avoid this issue occurring.
The Azure Service Bus MessageSender implementation includes an overload that uses IList<T> instead of IEnumerable<T>, it may be that this is a nicer overload. Alternatively, we may need to introduce a new method, EnqueueBatchAsync, instead of adding overloads of EnqueueAsync.
Test should be added to ensure the correct method is called when types of IEnumerable<T> and ICollection<T> are passed into the EnqueueAsync or EnqueueBatchAsync methods.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
EnqueueAsync
method has overloads that support sending anIEnumerable<T>
as well as sending a single object of typeT
.If the calling code sends a
List<T>
instead of anIEnumerable<T>
, the wrong overload will be picked and the queuing abstraction will send a single message with the serialized list within it, whereas the intent is for a batch of many messages to be sent.We should see how we can improve the API to avoid this issue occurring.
The Azure Service Bus
MessageSender
implementation includes an overload that usesIList<T>
instead ofIEnumerable<T>
, it may be that this is a nicer overload. Alternatively, we may need to introduce a new method,EnqueueBatchAsync
, instead of adding overloads ofEnqueueAsync
.Test should be added to ensure the correct method is called when types of
IEnumerable<T>
andICollection<T>
are passed into theEnqueueAsync
orEnqueueBatchAsync
methods.The text was updated successfully, but these errors were encountered: