Uploaded image for project: 'FUSE Message Broker'
  1. FUSE Message Broker
  2. MB-534

ManagedTransportConnection - Failed to register MBean

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.3.0.2-fuse
    • Fix Version/s: None
    • Component/s: broker
    • Labels:
      None
    • Environment:

      FUSE MB 5.3.0.2-fuse, multicast,

      Description

      Suppose two brokers each define two network connectors with a different name attribute (and also a different brokerName attribute) like in this example:

                  <networkConnector conduitSubscriptions="false"
                                  brokerName="amq01.prod.1"
                                  duplex="false"
                                  networkTTL="5"
                                  name="queue_grid"
                                  dynamicOnly="false"
                                  uri="multicast://239.255.2.3:6155"
                                  decreaseNetworkConsumerPriority="false">
                      <excludedDestinations>
                          <topic physicalName=">"/>
                      </excludedDestinations>
                      <staticallyIncludedDestinations>
                          <queue physicalName=">"/>
                      </staticallyIncludedDestinations>
                  </networkConnector>
                  <networkConnector conduitSubscriptions="true"
                                  brokerName="amq01.prod.2"
                                  duplex="false"
                                  networkTTL="5"
                                  name="topic_grid"
                                  dynamicOnly="false"
                                  uri="multicast://239.255.2.3:6155"
                                  decreaseNetworkConsumerPriority="false">
                  </networkConnector>

      The configuration is correct but it raises the following warning at runtime:

      ManagedTransportConnection     - Failed to register MBean: 
      org.apache.activemq:BrokerName=amq01.prod,Type=Connection,ConnectorName=tcp_//localhost_0,
      Connection=NC_amq02.prod_outbound

      in both brokers.
      This is because each brokers network connector will be registered at the peer broker. However they both use the same MBean name although the network connector name attribute and brokerName attribute are unique.

        Gliffy Diagrams

          Activity

          Hide
          mielket Torsten Mielke added a comment -

          Discussed the problem with gtully and he suggested that the network connector name should be part of the mbean name that is being registered.

          Also noticed that the brokerName attribute in the network connector config gets overridden with the brokerName of the <broker> config just before starting the network connector.

          XBeanBrokerSevice.java

          //around line 1895, method startAllConnectors
          for (Iterator<NetworkConnector> iter = getNetworkConnectors().iterator(); iter.hasNext();) {
                          NetworkConnector connector = iter.next();
                          connector.setLocalUri(uri);
                          connector.setBrokerName(getBrokerName());
                          connector.setDurableDestinations(durableDestinations);
                          connector.start();
                      }
           

          Show
          mielket Torsten Mielke added a comment - Discussed the problem with gtully and he suggested that the network connector name should be part of the mbean name that is being registered. Also noticed that the brokerName attribute in the network connector config gets overridden with the brokerName of the <broker> config just before starting the network connector. XBeanBrokerSevice.java //around line 1895, method startAllConnectors for (Iterator<NetworkConnector> iter = getNetworkConnectors().iterator(); iter.hasNext();) { NetworkConnector connector = iter.next(); connector.setLocalUri(uri); connector.setBrokerName(getBrokerName()); connector.setDurableDestinations(durableDestinations); connector.start(); }  
          Hide
          mielket Torsten Mielke added a comment -

          Also, when stopping a broker, the unregistration of this mbean fails.

          Show
          mielket Torsten Mielke added a comment - Also, when stopping a broker, the unregistration of this mbean fails.
          Hide
          mielket Torsten Mielke added a comment -

          Attaching JUnit testcase. It could be improved though.

          Show
          mielket Torsten Mielke added a comment - Attaching JUnit testcase. It could be improved though.

            People

            • Assignee:
              rajdavies Rob Davies
              Reporter:
              mielket Torsten Mielke
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: