activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GaryG <>
Subject Re: Message Groups and multiple brokers
Date Tue, 06 Feb 2007 18:54:16 GMT

James.Strachan wrote:
>> Does this mean that MessageGroups only work when there's only one broker,
>> and don't work in Master-Slave broker configuration??
> They work with a single broker or with Master-Slave. But they don't
> work with networks of brokers.

Then what am I doing wrong in my configuration?  For testing I have both
brokers running on my localhost, but on different ports.  When I set this in
the activemq.xml file for the 2nd (slave) broker - 

  <broker brokerName="localhost" masterConnectorURI="tcp://localhost:61616"
downOnMasterFailure="false" useJmx="true"

While the slave is on port 62616.  This doesn't work at all however.  I get
an exception on the master broker:

INFO  NetworkConnector               - Network Connector default-nc Started
INFO  BrokerService                  - ActiveMQ JMS Message Broker
(localhost, I
D:ATLLAP859-4437-1170787685776-1:0) started
INFO  TransportConnection            - Slave Broker localhost is attached
ERROR MasterBroker                   - Slave Failed
java.lang.AssertionError: Unsupported Method

So obviously I'm not configuring this Master-slave relationship correctly?

James.Strachan wrote:
> We don't automatically rebalance things after failures; we're
> currently hoping that there is a sufficient number of message groups
> around that things balance fine. (Though closing the message group
> should work - its just not defined which consumer will get the next
> message group - so if you keep trying to close them, you should
> eventually see things settle down).
> One work around is to just force each consumer to restart periodically
> to help re-balance things (or close the message groups as you figured
> out)

Closing the message group didn't work for me though.  I send this message:

Message message = session.createTextMessage("reset");
      message.setStringProperty("JMSXGroupID", msgGroupId);
      message.setIntProperty("JMSXGroupSeq", 0);

But it had no effect.  Are you saying I should try to send this message a
few times??  It would seem that whatever policy you're using to pick a
consumer for an un-assigned message group, it should prefer new consumers,
not ones that already have lots of msgGroupIDs registered to them.
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message