Contents

In a distributed environment where messages from a Queue are consumed by more than one message consumer, sometimes it is important to guarantee the order of messages processed by the group of consumers. Take the example of the classic operations - INSERT, UPDATE, DELETE. A message corresponding to the UPDATE operation cannot be processed ahead of a message corresponding to INSERT and likewise, a message corresponding to the DELETE operation cannot be processed before those related to INSERT or UPDATE.

However, in the usual scenario where more than one message consumer is registered to a Queue, it's not guaranteed that this message ordering is maintained while processing. From the above example, by allowing multiple applications consume from the Queue, there needs to be an additional distributed locking mechanism in the application code to ensure that the ordering is followed while processing messages.

This is where FioranoMQ's ExclusiveConsumer feature becomes relevant. When this functionality is enabled, the FioranoMQ broker ensures that only one consumer at a time consumes messages from a Queue. And when the registered exclusive consumer is closed or deregisters itself from the queue, the broker performs auto-failover and chooses another registered consumer. Till the time the registered exclusive consumer is active and running, the additional consumers on the Queue act as passive consumers and won't be part of message consumption.

Icon

This feature works only when Message Grouping is disabled at the Queue. Refer to the Configuring Message Grouping section for Message Grouping configuration.

Icon

For the Exclusive Consumer configuration, refer to the Configuring ExclusiveConsumer section.

Adaptavist ThemeBuilder EngineAtlassian Confluence