Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-2337

[artemis-jms-client] if connecting to a list, and if a node is off, initialConnectAttempts=-1 would retry forever once it tried a dead node

    XMLWordPrintable

Details

    • Release Notes
    • +
    • Hide
      In prior releases, an AMQ Core Protocol JMS Client might make repeated attempts to connect to an unavailable broker server, even if alternative broker servers were specified in the client’s `ConnectionFactory` configuration. Specifically, this situation occurred if you set the `initialConnectAttempts` option to `-1`. This is shown in the example below.

      `connectionFactory.ConnectionFactory=(tcp://host1:61616,tcp://host2:61716)?initialConnectAttempts=-1`

      This issue is now resolved. If the first listed server that the client tries is unavailable, the client immediately tries the next, and so on. The client repeats this loop until it establishes a connection.
      Show
      In prior releases, an AMQ Core Protocol JMS Client might make repeated attempts to connect to an unavailable broker server, even if alternative broker servers were specified in the client’s `ConnectionFactory` configuration. Specifically, this situation occurred if you set the `initialConnectAttempts` option to `-1`. This is shown in the example below. `connectionFactory.ConnectionFactory=( tcp://host1:61616,tcp://host2:61716)?initialConnectAttempts=-1 ` This issue is now resolved. If the first listed server that the client tries is unavailable, the client immediately tries the next, and so on. The client repeats this loop until it establishes a connection.
    • Documented as Resolved Issue
    • Verified in a release

    Description

      Failover or similar option for AMQ Core Protocol JMS Client.

      While using initialConnectAttempts = -1 with Core Protocol JMS Client like below

      connectionFactory.ConnectionFactory=(tcp://localhost:61616,tcp://localhost:61716)?initialConnectAttempts=-1
      

      Above configuration will retry only 1 address i.e "tcp://localhost:61616" in the list indefinitely. This means, that if the other server is started, the client will never connect to it.

      In AMQ JMS Client (AMQP), we have a failover option,

      connectionFactory.ConnectionFactory=failover:(amqp://localhost:5672,amqp://localhost:5772)?failover.maxReconnectAttempts=-1
      

      Looking similar option for Core Protocol JMS Client.

      Attachments

        Issue Links

          Activity

            People

              csuconic@redhat.com Clebert Suconic
              rhn-support-shsingh Shailendra Singh
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: