activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Input queue and output queue grouping and sequences question
Date Thu, 12 Apr 2007 17:08:52 GMT
On 4/12/07, tnine <> wrote:
> Let me give a clearer example.  Lets say I have 4 "real" messages, that
> contain data.  I have a 5th message that contains no data but closes the
> group on the input queue.  I need to replicate the order of items from the
> input queue to the order on the output queue because the consumer of the
> output queue needs to know when the group is finished in order to flush the
> output file to the system.  Here is the scenario I was describing explained
> a bit clearer, (I hope since I included a bit of source)
> Step 1: messages 1 through 3 are processed normally and put on the output
> queue.
> Step 2: message 4 begins processing, then message 5, the "close group"
> message gets processed simultaneously.  Message 5 will most likely be
> inserted on the output queue before message 4 since there will be no
> processing of the closing message.

So here's the cool thing about Message Groups. The contract is 1
thread in the entire cluster of processes & threads gets the messages
for a single message group. So you will always process message 4
first, then message 5. So there will be no out-of-order issues. Cool
eh? :)



View raw message