0
votes

ASB's SessionId can be used to guarantee ordering, for example if we have 5 messages which update an order, and 3 consumers running, the consumers won't process multiple messages for that order (SessionId = OrderId) at the same time.

But suppose I have 3 topics:

  • CreateOrder
  • UpdateOrder
  • DeleteOrder

If there are X messages spread across these 3 topics, all with the same SessionId, would the consumers for each topic pay any attention to the SessionId being used by other topics?

As in, if a message were being consumed by a CreateOrder consumer with SessionId=5, would the UpdateOrder consumer wait for this lock to release before picking up one of its own messages with SessionId=5?

1
Is that you want to know the impact when the same session id in different topics?Jim Xu
You might word it like that, yesFBryant87

1 Answers

1
votes

The sessions of different topics are independent and do not affect each other. In other words, when you receive messages with SessionId=1 in topic1, you also can receive messages with SessionId=2 in topic2. For more details, please refer to the official document Azure Service Bus message sessions. enter image description here