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

Warning when using multicast discoveryUri

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0.1, 4.0.2
    • 4.1.1, 5.0.0
    • None
    • None
    • reproduced on Windows XP Pro and SuSE Linux Enterprise 9.1

    • Patch Available

    Description

      When using a transportconnector with a multicast discoveryagent a warning is shown.

      config: <transportConnector name="default" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>

      WARN MulticastDiscoveryAgent -brokerName not set

      When the transportconnector is started the MulticastDiscoveryAgent is created if it does not exist,
      but the brokerName for this MulticastDiscoveryAgent is not set by the transportconnector.

      See the code and the suggested modification to prevent this warning:

      org.apache.activemq.broker.TransportConnector.java

      <snip>
      public void start() throws Exception {
      getServer().start();
      DiscoveryAgent da = getDiscoveryAgent();
      if( da!=null ) {
      da.registerService(getConnectUri().toString());
      //suggested modification start
      if(da.getBrokerName() == null || da.getBrokerName().length == 0)

      { da.setBrokerName(this.getBroker().getBrokerName()); }

      //suggested modification end
      da.start();
      }
      this.statusDector.start();
      log.info("Connector "getName()" Started");
      }
      <snap>

      Attachments

        Activity

          People

            Unassigned Unassigned
            brandtal Olaf Brandt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: