Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send 100+ messages transactionaly to Azure service Bus

How to send more than 100 brokered messages to Azure Service Bus within a Transaction?

I know that TransactionScope does the trick but is limited to 100 messages. And I know that if I send the messages as a Batch operation, the total size of the message is limited which causes the batches to be splited in different batches and the transaction is not guaranteed. And I think that the issue with the 100 messages remains even with batch send.

Does anyone found a solution?

like image 965
Diogo Bento Avatar asked Dec 11 '25 11:12

Diogo Bento


1 Answers

Well, since you can't transfer all the information you need using Service Bus, you'll have to transfer it some other way.

Store all the data relevant to the transactions in another location (Azure Storage?), then send one message containing the location of data file - the file that contains information about the 10,000 operations that are supposed to take place in one transaction.

Your service, inside its transaction, will read the data file and perform the operations.

like image 91
zmbq Avatar answered Dec 14 '25 00:12

zmbq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!