Azure / azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
https://azure.microsoft.com/services/service-bus
MIT License
586 stars 776 forks source link

Topic Support Ordering and partition in subscription #562

Closed bandishankar closed 1 year ago

bandishankar commented 1 year ago

Description

My question is more specific to a scenario. I need my message published to topic and received in subscription in FIFO order . Now since there is an option in topic "SupportOrdering " .

My question is , If I make "SupportOrdering" true in topic , and "enable partition" false in subscription . Does this means that my message are delivered in FIFO order as it published in topic.

EldertGrootenboer commented 1 year ago

Correct, if you have a non-partitioned topic, setting SupportOrdering to true will ensure that messages are sent to subscriptions in the same order as they came in on the topic. Beware, if you have multiple consumers on a subscription, and you want your messages to be processed in absolute order, you should also have a look at sessions.

bandishankar commented 1 year ago

@EldertGrootenboer , I need to do message forwarding from subscription to queue . Since service bus does not allow message forwarding in session enabled subscriptions . So I want to be sure that if I make "SupportOrdering" true in topic and no partition in subscription and use message forwarding to non partitioned queue than I will receive message in FIFO order from queue ?

EldertGrootenboer commented 1 year ago

Correct, they will be sent to the queue in order.