What version of activemq are you using?
On Fri, Oct 12, 2012 at 12:44 PM, ajCohen <[email protected]> wrote:
> 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.
>
--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta