On 6/19/06, James Strachan <[EMAIL PROTECTED]> wrote:

On 6/17/06, Sanjiv Jivan <[EMAIL PROTECTED]> wrote:
> The Message Group functionality of Active MQ 4.0 is really neat. I have
a
> couple of questions regarding this
>
> 1. Is this feature fully supported/tested with the P2P discovery style
> broker topology? Are they any test cases or samples I can try. I looked
for
> them in the source but wasn't able to locate them. And when I tried
running
> such a scenario, I did not see a proper load balancing (even round robin
> style) of message groups across available brokers. When messages
belonging
> to different message groups are sent, oftentimes only one or a small
> percentage of running brokers are chosen as recipients. As a result I
end up
> with some brokers that are overloaded while others are sitting idle.

Generally Message Groups only apply to the broker which you are using;
there is no global cross-broker load balancing. So its intended when
using a traditional client-broker topology rather than a peer based
network.

Though I'm surprised that you are finding on a single broker it is not
load balancing requests across multiple brokers. Are you sure there
are suitable consumers on those brokers?


Consider a scenario where there are two servers, each of which have an
embedded broker. What I'm seeing is that when clients send messages using
Message Groups "MG1", "MG2", "MG3" and "MG4" etc,  the messages with these
different message groups aren't load balanced as expected. For example, MG1
and MG2 (and sometimes even MG3) might be received by SERVER1. I was
expected MG1 to go to SERVER1, MG2 to SERVER2, MG3 to SERVER1, MG4 to
SERVER2 and so on.. The sample app that I uploaded with issue AMQ-760
demonstrates this. Is this the expected behaviour? What is the message group
based load balancing algorithm used?

2. Is there a way to detach a message group affinity to a particular
broker.

Just set JMSXGroupSeq to zero on the last message which 'closes' the
message group so if another message is sent in the future with the
same group ID it will be reassigned to a new consumer.

message.setIntProperty("JMSXGroupSeq", 0);

This would reset all the affinity of all the message groups, right? This
does not help with my use case where a message group represents a
conversation and there can be several "conversations" taking place at the
same time. I would like the ability to end conversations on a per message
group basis and not globally. For example messages from MG1 might be
directed to SERVER1 and MG2 to SERVER2. After a sequence of operations, I
would like to end the conversation for MG1 but do not want to end the
conversation for MG2 and this might result in some MG2 messages going to
SERVER1 which has no knowledge of MG2's prior conversation.


Thanks,
Sanjiv

Reply via email to