On 06/24/2011 04:07 PM, Ken Giusti wrote:

Message Groups

Status

Draft

Summary

This document describes a new feature that would allow a message producer to 
enforce the order in which the data from a set of related messages are 
processed by consumers.

Problem

While the broker currently employs an strict FIFO queuing model, it does not 
guarantee that messages will be processed in that order when there are multiple 
consumers subscribed to a queue. Therefore, it is impossible for a producer to 
enforce a strict ordering to the processing of messages, even though it may be 
required by the application.

For example, assume we have a shopping application that manages items in a virtual shopping cart. A user may add an 
item to their shopping cart, then change their mind and remove it. If the application sends an "add" message 
to the broker, immediately followed by a "remove" message, they will be queued in the proper order - 
"add", then "remove".

However, if there are multiple consumers, it is possible that once a consumer acquires the "add" message, a 
different consumer may acquire the "remove" message. This allows both messages to be processed in parallel, 
which could result in the "remove" operation being performed before the "add" operation.
Solution

This problem can be solved by allowing a producer to mark a group of messages 
as being related, and having the broker enforce strict ordering of consumption 
of messages belonging to that group.

Sounds good to me.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to