Message Delivery: Ordered Messages

Learn the importance of order message delivery guarantee in event processing.

As with delivery guarantees, the order we will receive events comes with its own scale of guarantees of order. We can quickly find ourselves in a difficult situation if we listen to our vendor who promises that their product always delivers messages in the order they were published and later learn we are processing ProductRemoved events before the corresponding ProductAdded event.

The number of consumers we use and how we use them can have a huge impact on ordering.

  • Single consumer: A single consumer subscribed to a first-in, first-out (FIFO) queue will receive messages in the order that they were published, as depicted in the following diagram:

Get hands-on with 1400+ tech skills courses.