On 06/28/2011 03:31 PM, Alan Conway wrote:
It seems to me that the first mode contains the second: the client can simply delay acknowledgement of at least one message until it is happy that the entire group is processed (which could be the entire life of the consumer, or some shorter span at the clients discretion.)
Where the group has a distinct scope and should be treated as a single logical unit, it is natural to acknowledge all the message comprising the group at once. There I agree that the first scope is sufficient.
However the group may last 'forever'; it could be that there is never a point where there are no more messages for the group ever likely to be published.
E.g. imagine the group relates to some real world object being modelled and each message contains describes an update to its state in relative terms (e.g. temperature increased by 5 degrees or whatever).
In order to process these messages the consumer must maintain the current state of the object, which is a function of all the messages seen thus far.
In this case it would be valuable to have all the messages for the group go to the same consumer while it was alive, to avoid anyone else having to reboot the initial state somehow (lets imagine that's 'expensive').
It would be annoying for the application to artificially keep one message unaccepted just to keep the association active. This is where I think the second scope is useful.
--------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
