Details
Description
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' topic 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);
}
Attachments
Issue Links
- relates to
-
AMQ-4122 Lease Database Locker failover broken
- Resolved