Uploaded image for project: 'Qpid JMS'
  1. Qpid JMS
  2. QPIDJMS-563

Failover loop on send with server killing connection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.5.0
    • None
    • qpid-jms-client
    • None

    Description

      Summary:

      Having a amqp v1 message which is rejected by the amqp v1 broker results in an endless failover loop blocking the JmsMessageProducer.send method.

      Expected:

      The failover of the qpid jms client tries to connect and send the rejected message in a maximum of failover.maxReconnectAttempts.

      Actual:

      The result of the message send task is not taken into account for counting the attempts.
      The JmsMessageProducer.send gets stuck forever.

      1. Failover connects to the failover uri and then resets the attempt counter.
      2. Sending the message results in REJECT outcome.
      3. Failover connects to the next failover uri and then resets the attempt counter.
      4. Sending the message results in REJECT outcome.
      5. ... repeats and does not stop on maxReconnectAttempts.

      Code analysis:

      FailoverProvider.java#L1282 already resets the connection attempts with reconnectControl.connectionEstablished() not waiting for the success of the send task, resulting in an endless failover loop.

      Background:

      In our case we are using RabbitMQ with the amqp v1 plugin. There are scenarios where the broker is answering with REJECT outcomes (overflow policy, high watermark etc). Right now we cannot use this feature because the client is stuck and the RabbitMQ is flooded with reconnects.

      We would be very grateful having a fix.

      Thanks for the good work and best regards

      Thomas

       

       

      Attachments

        1. rabbitmq-queue-config.png
          26 kB
          Shaan Jayaratna
        2. rabbitmq-client-with-failover.zip
          27 kB
          Shaan Jayaratna

        Activity

          People

            Unassigned Unassigned
            tstollenwerk Thomas Stollenwerk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: