[Feature] Support Bulk Deposit into the outbox
I have a requirement to dispatch a batch of commands, i.e. for Pay Interest, all accounts are batched into chunks and then I sent thousands of PayInterestToAccountsCommand
Describe the solution you'd like On the command processor I would like DepositPost to take an array of message and then persist them to the outbox in a single (or smaller number of) statements
Describe alternatives you've considered At the minute I've written things to go around Brighter as going through brighter was far too much of a performance hit
@iancooper let me know if you're ok for me to go ahead with this,
Also would you like it to be DepositPost or would you like it to stick out i.e. BulkDepositPost, The return type would have to change to an array of persisted messages as well
@preardon Technically, if we change the interface in a breaking way, it would be a bump to v10. So I think that would mean we need a BulkDeposit in v9. We could choose to collapse them together in V10. I guess there might be some advantages in keeping them separate, because you are going to need to create bulk insert statements for a lot of storage tools, so it would then be possible to identify with each release which outboxes now support a bulk write.
PS It is still a minor version change, to alter the API in a backward compatible way, not a patch, of course.
@iancooper not suggesting a breaking change, just an overload, happy to do it either way.
I was thinking that we may want a new Interface for IAmABulkOutboxAsync
@preardon If its an overload, that works just as well. Do that!
This has been delivered is 9.2.3