简体   繁体   中英

Azure Service Bus SessionId across multiple topics?

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?

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 . 在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM