[
https://issues.apache.org/jira/browse/AMQ-4108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dejan Bosanac reassigned AMQ-4108:
----------------------------------
Assignee: Dejan Bosanac
> Cannot receive '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
> Assignee: Dejan Bosanac
> Labels: advisory
>
> 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);
> }
--
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