activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GaryG <ggive...@us.ibm.com>
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"
shut
downOnMasterFailure="false" useJmx="true"
xmlns="http://activemq.org/config/1.0"
>

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
        at
org.apache.activemq.transport.TransportSupport.request(TransportSuppo
rt.java:71)
        at
org.apache.activemq.transport.TransportFilter.request(TransportFilter
.java:88)
        at
org.apache.activemq.transport.TransportFilter.request(TransportFilter
.java:88)
        at
org.apache.activemq.transport.MutexTransport.request(MutexTransport.j
ava:49)
        at
org.apache.activemq.broker.ft.MasterBroker.sendSyncToSlave(MasterBrok
er.java:363)
        at
org.apache.activemq.broker.ft.MasterBroker.sendToSlave(MasterBroker.j
ava:333)
        at
org.apache.activemq.broker.ft.MasterBroker.send(MasterBroker.java:307


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: http://www.nabble.com/Message-Groups-and-multiple-brokers-tf3177852.html#a8831919
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message