activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Cohen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-4108) Cannot recieve 'ActiveMQ.Advisory.MasterBroker' messages when master dies and slave takes control
Date Mon, 15 Oct 2012 20:43:03 GMT
Andrew Cohen created AMQ-4108:
---------------------------------

             Summary: Cannot recieve 'ActiveMQ.Advisory.MasterBroker' messages when master
dies and slave takes control
                 Key: AMQ-4108
                 URL: https://issues.apache.org/jira/browse/AMQ-4108
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.7.0
         Environment: Windows or Linux. Java 1.7.0_07. 
            Reporter: Andrew Cohen


Message consumers do not receive 'ActiveMQ.Advisory.MasterBroker' advisory messages when the
master is killed and the slave takes over.

Steps:

1) Start Master and Slave brokers in Pure "Master / Slave" Configuration.
2) Create a client consumer for the 'ActiveMQ.Advisory.MasterBroker' topic. (See code below)
3) Kill the Master broker. (kill -9)
4) The client will failover to the slave. Note the Web Console shows there is one en-queued
message for the 'ActiveMQ.Advisory.MasterBroker' topic.
5) The consumer will never receive/dequeue this message. (Event after restarting the client)


Two other observations:

1) Other advisories (such as the 'ActiveMQ.Advisory.Connection')are working. This only seems
to be a problem with 'ActiveMQ.Advisory.MasterBroker'.

2) Sending a message to the 'ActiveMQ.Advisory.MasterBroker' via the Web Console is properly
received and dequeued by the consumer.
 

Code:

Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer consumer = session.createConsumer( AdvisorySupport.getMasterBrokerAdvisoryTopic()
);
// It will receive Connection Advisory messages! Just not MasterBroker advisory messages :(
//MessageConsumer consumer = session.createConsumer( AdvisorySupport.getConnectionAdvisoryTopic()
);

Message msg = null;
while (true) {
        // Also doesn't work with MessageListener implementation
        msg = consumer.receive(30000);
        System.out.println(name + " Received: " + msg);
} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message