-
Notifications
You must be signed in to change notification settings - Fork 118
Feature - Send-Via / TransferSender to send messages across entities in a transaction #438
Conversation
@@ -252,6 +284,11 @@ public Task SendAsync(Message message) | |||
"Cannot schedule messages in the past"); | |||
} | |||
|
|||
if (this.isViaSender && Transaction.Current != null) | |||
{ | |||
throw new ServiceBusException(false, $"{nameof(ScheduleMessageAsync)} method is not supported in a Via-Sender."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should exception message be more specific as per why it's not supported? There are two constraints, send-via and transaction.
@SeanFeldman |
We need a |
nemakam added patience-sean label 5 minutes ago |
Epic! 😂 |
@nemakam any updates? Thanks. |
@SeanFeldman |
Description
This feature lets a user send messages across entities in a single transaction.
A single transaction cannot theoretically span across entities. So as to support cross-entity transaction, you can now send a message to a
destination-queue
via another queue. The transaction will be performed on thevia-queue
, and once successful, the message will be forwarded/transferred to its intended destination.Resolves #423
Sample:
In the above example, operations on both
message1
andmessage2
(intended for different entities) are being performed within the same entity (i.e., thevia-queue
)