activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajCohen <aco...@morphotrust.com>
Subject Consumer cannot receive 'ActiveMQ.Advisory.MasterBroker' messages
Date Fri, 12 Oct 2012 19:44:10 GMT
Hi All,

For some reason I cannot get my message consumer to consume an
'ActiveMQ.Advisory.MasterBroker' advisory message. When the master is
killed, the slave takes over and I can see in the slave web console (under
topics) that one 'ActiveMQ.Advisory.MasterBroker' message was enqueued.
However, my Message Consumer never receives it! The code snippet below
illustrates what I'm doing. Note that I can  consume
'ActiveMQ.Advisory.Connection' messages using the same code!! Any help would
be greatly appreciated.

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) {
        msg = consumer.receive(30000);
	System.out.println(name + " Received: " + msg);
}

-Andrew



--
View this message in context: http://activemq.2283324.n4.nabble.com/Consumer-cannot-receive-ActiveMQ-Advisory-MasterBroker-messages-tp4657769.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message