Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-4108

Cannot receive 'ActiveMQ.Advisory.MasterBroker' messages when master dies and slave takes control

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.7.0
    • 5.8.0
    • Broker
    • Windows or Linux. Java 1.7.0_07.

    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

          Activity

            People

              dejanb Dejan Bosanac
              ajcohen Andrew Cohen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: