Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-2160

Cluster connection non-default configuration elements ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.3
    • 2.6.4, 2.7.0
    • Broker
    • None
    • RHEL 7.5

      OpenShift 3.9

      JDK 1.8

       

    Description

      In doing some testing that required non-default values for the cluster connection options for reconnectAttempts and retryInterval it was seen, when TRACE logging was on, that the setting provided were not adhere'd to and instead utilized what appeared to be default values:

      2018-10-12 02:19:20,290 FINE  [org.apache.commons.beanutils.BeanUtils] BeanUtils.populate(ClusterConnectionConfiguration{name='null', address='', connectorName='null', clientFailureCheckPeriod=30000, connectionTTL=60000, retryInterval=500, retryIntervalMultiplier=1.0, maxRetryInterval=2000, initialConnectAttempts=-1, reconnectAttempts=-1, callTimeout=30000, callFailoverTimeout=-1, duplicateDetection=true, messageLoadBalancingType=ON_DEMAND, compositeMembers=null, staticConnectors=[], discoveryGroupName='my-discovery-group', maxHops=1, confirmationWindowSize=10485760, allowDirectConnectionsOnly=false, minLargeMessageSize=102400, clusterNotificationInterval=1000, clusterNotificationAttempts=2}, {retryIntervalMultiplier=2, reconnectAttempts=10, maxHops=1, messageLoadBalancingType=ON_DEMAND, connectorName=artemis, retryInterval=500, useDuplicateDetection=true})
      .
      .
      .
      2018-10-12 02:19:20,311 FINE  [org.apache.commons.beanutils.converters.LongConverter]     Converted to Long value '500'
      Adding cluster connection :: ClusterConnectionConfiguration{name='my-cluster', address='', connectorName='artemis', clientFailureCheckPeriod=30000, connectionTTL=60000, retryInterval=500, retryIntervalMultiplier=2.0, maxRetryInterval=2000, initialConnectAttempts=-1, reconnectAttempts=10, callTimeout=30000, callFailoverTimeout=-1, duplicateDetection=true, messageLoadBalancingType=ON_DEMAND, compositeMembers=null, staticConnectors=[], discoveryGroupName='my-discovery-group', maxHops=1, confirmationWindowSize=10485760, allowDirectConnectionsOnly=false, minLargeMessageSize=102400, clusterNotificationInterval=1000, clusterNotificationAttempts=2}
      .
      .
      .
      

      and

      2018-10-12 02:21:26,464 TRACE [org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl] getConnectionWithRetry::-1 with retryInterval = 2000 multiplier = 1.0: java.lang.Exception: trace
      .
      .
      .
      2018-10-12 02:21:26,508 DEBUG [org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl] Trying reconnection attempt 0/-1
      2018-10-12 02:21:26,508 DEBUG [org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl] Trying to connect with connectorFactory = org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@2dd61eef, connectorConfig=TransportConfiguration(name=artemis, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?port=61616&host=application34-amq-1-amq34-amq-headless-amq72-clustered-53-svc-cluster-local
      2018-10-12 02:21:26,508 DEBUG [org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector] Connector NettyConnector [host=application34-amq-1.amq34-amq-headless.amq72-clustered-53.svc.cluster.local, port=61616, httpEnabled=false, httpUpgradeEnabled=false, useServlet=false, servletPath=/messaging/ActiveMQServlet, sslEnabled=false, useNio=true] using native epoll
      .
      .
      .
      2018-10-12 02:22:30,949 DEBUG [org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl] Trying reconnection attempt 32/-1
      2018-10-12 02:22:30,949 DEBUG [org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl] Trying to connect with connectorFactory = org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@2dd61eef, connectorConfig=TransportConfiguration(name=artemis, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?port=61616&host=application34-amq-1-amq34-amq-headless-amq72-clustered-53-svc-cluster-local
      2018-10-12 02:22:30,950 DEBUG [org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector] Connector NettyConnector [host=application34-amq-1.amq34-amq-headless.amq72-clustered-53.svc.cluster.local, port=61616, httpEnabled=false, httpUpgradeEnabled=false, useServlet=false, servletPath=/messaging/ActiveMQServlet, sslEnabled=false, useNio=true] using native epoll
      

      Generated from a configuration of:

      <broadcast-groups>
        <broadcast-group name="my-broadcast-group">
          <jgroups-file>jgroups-ping.xml</jgroups-file>
          <jgroups-channel>activemq_broadcast_channel</jgroups-channel>
          <connector-ref>artemis</connector-ref>
        </broadcast-group>
      </broadcast-groups>
      

       

      <discovery-groups>
        <discovery-group name="my-discovery-group">
          <jgroups-file>jgroups-ping.xml</jgroups-file>
          <jgroups-channel>activemq_broadcast_channel</jgroups-channel>
          <refresh-timeout>10000</refresh-timeout>
        </discovery-group>
      </discovery-groups>
      

       

      <cluster-connections>
        <cluster-connection-uri address="multicast://my-discoverygroup?messageLoadBalancingType=ON_DEMAND;retryInterval=500;retryIntervalMultiplier=2;reconnectAttempts=10;useDuplicateDetection=true;connectorName=artemis;maxHops=1" name="my-cluster"/>
      </cluster-connections>
      

      also with the cluster-connections defined as

      <cluster-connections>
        <cluster-connection name="my-cluster">
          <connector-ref>artemis</connector-ref>
          <retry-interval>1000</retry-interval>
          <retry-interval-multiplier>2.0</retry-interval-multiplier>
          <max-retry-interval>600000</max-retry-interval>
          <initial-connect-attempts>20</initial-connect-attempts>
          <reconnect-attempts>10</reconnect-attempts>
          <use-duplicate-detection>true</use-duplicate-detection>
          <message-load-balancing>ON_DEMAND</message-load-balancing>
          <max-hops>1</max-hops>
          <discovery-group-ref discovery-group-name="my-discovery-group"/>
        </cluster-connection>
      </cluster-connections>
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rkieley Roddie Kieley
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: