activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Input queue and output queue grouping and sequences question
Date Thu, 12 Apr 2007 14:19:46 GMT
On 4/12/07, tnine <todd.nine@gmail.com> wrote:
>
> Excellent!  Thank you for the help.  I may have a race condition that I've
> thought of that may cause problems, but this may be taken care of my the
> grouping.  If you could give me some advice, I would really appreciate it.
>
> It pertains to the grid processing and the nth and n-1 messages in a group
> in a 2 node or greater environment.  Lets say we have n messages in the
> group, where the last message (n) sets the sequence number to 0 to close the
> group.  When my n-1 message is consumed off the input queue, it will take a
> few seconds to process.  The nth message is to signal the group is closed,
> so the receiving MDB will simply push a new message with the sequence 0 on
> to the output queue.  The message with 0 will be on the output queue before
> the n-1 sequence is pushed.  Won't my n-1 message get excluded from the
> group since its inserted after 0?

I don't quite follow. Note that the sequence number is not used to
reorder the messages in the group. The zero is only used to close a
group. (To be honest there's no real need to close a group since we're
using hash buckets under the covers by default so there's little cost
to keeping a group open).


> This is an implementation detail, but an
> important one.  Below is an ASCII diagram of my queues and MDB
>
> Standalone file reader--->Input Queue (jms/StatInput)-->  MDB >-- Output
> Queue(jms/StatOutput) --> Consumer
>
> As you can see, I have 2 queues for round trip communication, will this
> cause the sequences issues I described above?  If so, do you have any ideas
> on how I can get around them?

Each queue is separate and wil be ordered based on the order in which
messages (within a group) are published; so it all sounds fine to me

-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message