0
votes

I am confused with whether or not message ordering delivery is supported by default for Queue and Topic.

It said below FIFO message delivery is supported for Queue. I assume this is the same as message ordering delivery.

Queues offer First In, First Out (FIFO) message delivery to one or more competing consumers. https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions

However, why is Enabling Sessions required as the screenshot below shown.

To realize a FIFO guarantee in Service Bus, use Sessions.

https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-sessions

enter image description here

Topics and Subscriptions

What about FIFO for Topics and Subscriptions?

Update

My question is:

Is message ordering delivery (FIFO) supported by default for Queues and Topics/Subscriptions, without using Sessons? Other brokers like RabbitMQ supports this by default if I remember correctly.

Am I correct that if I want FIFO for all messages in the Queue even thought I don't need sessions of ordered message, I need to enable Sessions?

For example:

All messages in the queue with ordering: I need all message ordering preserved without enabling session:

1, 2, 3, 4, ... n

Sessions of ordered messages: I don't want to enable sessions

session 1: 1, 2, 3, n

session 2: 1, 2, 3, n

session n: 1, 2, 3, n

Is this requirement of enabling session only to preserve message ordering cubersome, even when I don't want sessions of messages?

1

1 Answers

1
votes

Session can be enabled on entities that support receiving. That would be queues and subscriptions. Topics can only be used for sending.

Updated

I need all message ordering preserved without enabling session

This will not work. Ordered messages require sessions to insure the order is enforced. Without sessions, messages can get out of order easily.