On 06/28/2011 11:39 AM, Gordon Sim wrote:
So I think the requirements are:
(1) message group must always be processed in order
(2) all messages in a group are processed by the same consumer
(3) the consumer will only complete processing having received the
'final' message in the group
Where (3) implies (2) and (2) implies (1).
Actually on further consideration, I think I need to qualify this last
sentence a little.
The broker doesn't know what the 'final' message is. However it requires
some state to track stickiness of group to consumer. In use case (3) I
actually think the assumption on stickiness is the same as for my
preferred implementation of (1). I.e. the association between group and
consumer only lasts for as long as there are outstanding unaccepted
messages.
In that sense (3) can be met along with (1). There is of course a sense
where it may still be true that (3) implies that all the messages in a
group are processed by the same consumer. However that is really based
on the external consideration of whether there will be any further use
of the same group id.
So I do think that the key distinction is in the scope of the
association between group and consumer. It is either scoped to the life
of the consumer (satisfying requirement 2) or it is scoped to the
existence of outstanding, unaccepted messages in the group (satisfying
requirements 1 and 3).
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]