activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Message group bottleneck?
Date Tue, 10 Oct 2006 12:51:12 GMT
On 10/9/06, javaxmlsoapdev <> wrote:
> I am developing a trading application where we are using message groups.
> Stock symbols, Ids are used as JMSXGroupID. Very similar to this sample
> link's example.
> I am using Jencks pooling for resource pooling etc.
> Now my question is; with the usage of JMSXGroupID property, will activemq
> create and assign IBM, MSFT,SUNW and other stocks, each to unique queue
> instance?

No - but they are assigned to a single consumer. The effect is kinda
like each consumer having its  own queue and all IBM messages being
put on the same consumer queue - but there really only is 1 queue.

> In terms of load balancing. let's say IBM is generally busy stock and I want
> to have multiple consumers taking care of this. With the use of message
> group, can this be possible or I can only have one consumer per symbol(in
> that case message group can be a bottleneck)? please advise.

So if you want load balancing of messages for IBM, then don't use
message groups. The entire reason to use message groups is you want to
preserve message order of IBM messages - which means you must only
have 1 single consumer active at any moment in time to process IBM
messages (and so no load balancing for IBM messages).

If you want to load balance across symbols (so that say each consumer
just processes 1 symbol) then just keep booting up consumers - the
more consumers there are the less symbols each consumer has to

The message group key (JMSXGroupID) is your way of specifying how
parallel to make the consumption of the messages - so to further
increase the parallelisation, you could try figure out how you can
further split up, say, IBM messages. e.g. use IBM_Exchange_Date to be
able to parallelise IBM symbols traded on different days on different
exchanges or whatever. But its your call on how much you care about
ordering on how much you want to parallelize



View raw message