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
Hi, my question is simple - Let's assume I want to send 10000 messages, while being in a message handler already. Can I do optimization in any way? I see no API methods for sending a collection of messages and I was wondering if there are any ways to optimize work in such case. Current code would be something of a sort:
foreach (var message in messages)
{
await _bus.Send(message);
}
I'm not sure if it helps, but I use SqlServer in leased mode as transport layer.
The text was updated successfully, but these errors were encountered:
I have checked with sql profiler that all messages are sent in a single transaction, but are done via single insert operations, is there a way to insert multiple rows in a single db operation?
But it would definitely be possible for the SQL transport to optimize this, simply by storing messages to be sent in the transaction context, and then do the insertion when committing the message transaction.
I can take a look at this myself when my summer holiday is over 😎 or if anyone feels like fixing it and submit a PR, I'll be happy to be here with guidance.
Hi, my question is simple - Let's assume I want to send 10000 messages, while being in a message handler already. Can I do optimization in any way? I see no API methods for sending a collection of messages and I was wondering if there are any ways to optimize work in such case. Current code would be something of a sort:
I'm not sure if it helps, but I use SqlServer in leased mode as transport layer.
The text was updated successfully, but these errors were encountered: