Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7914

camel-jms retryInterval seems to have no effect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.0, fuse-6.x-GA
    • jboss-fuse-6.3
    • Camel
    • None
    • % %
    • Hide

      Attached is the reproducer, camel-jms-recoveryInterval.zip.

      • Execute mvn activemq:run to start the broker.
      • Execute mvn camel:run to start the camel route.

      Results:
      Even with setting the below at component level,

      <inOut uri="jms:personnel.records?recoveryInterval=60000&amp;replyToConcurrentConsumers=10"/>
      

      we can see the below default values for 'retryInterval',

      2018-03-28 22:49:52,564 ERROR (Camel (camel-1) thread #0 - JmsConsumer[personnel.records]) [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] - Could not refresh JMS Connection for destination 'personnel.records' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused (Connection refused)
      2018-03-28 22:49:57,567 ERROR (Camel (camel-1) thread #0 - JmsConsumer[personnel.records]) [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] - Could not refresh JMS Connection for destination 'personnel.records' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused (Connection refused)
      2018-03-28 22:50:02,570 ERROR (Camel (camel-1) thread #0 - JmsConsumer[personnel.records]) [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] - Could not refresh JMS Connection for destination 'personnel.records' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused (Connection refused)
      
      • However, the same when used with camel community 2.17.0 or 2.18.0 version, we can see the below results:
      2018-03-28 22:53:36,107 WARN (Camel (camel-1) thread #0 - JmsConsumer[personnel.records]) [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] - Setup of JMS message listener invoker failed for destination 'personnel.records' - trying to recover. Cause: java.io.EOFException
      2018-03-28 22:53:36,109 ERROR (Camel (camel-1) thread #0 - JmsConsumer[personnel.records]) [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] - Could not refresh JMS Connection for destination 'personnel.records' - retrying using FixedBackOff{interval=60000, currentAttempts=0, maxAttempts=unlimited}. Cause: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused (Connection refused)
      
      Show
      Attached is the reproducer, camel-jms-recoveryInterval.zip. Execute mvn activemq:run to start the broker. Execute mvn camel:run to start the camel route. Results: Even with setting the below at component level, <inOut uri= "jms:personnel.records?recoveryInterval=60000&amp;replyToConcurrentConsumers=10" /> we can see the below default values for 'retryInterval', 2018-03-28 22:49:52,564 ERROR (Camel (camel-1) thread #0 - JmsConsumer[personnel.records]) [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] - Could not refresh JMS Connection for destination 'personnel.records' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp: //localhost:61616. Reason: java.net.ConnectException: Connection refused (Connection refused) 2018-03-28 22:49:57,567 ERROR (Camel (camel-1) thread #0 - JmsConsumer[personnel.records]) [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] - Could not refresh JMS Connection for destination 'personnel.records' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp: //localhost:61616. Reason: java.net.ConnectException: Connection refused (Connection refused) 2018-03-28 22:50:02,570 ERROR (Camel (camel-1) thread #0 - JmsConsumer[personnel.records]) [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] - Could not refresh JMS Connection for destination 'personnel.records' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp: //localhost:61616. Reason: java.net.ConnectException: Connection refused (Connection refused) However, the same when used with camel community 2.17.0 or 2.18.0 version, we can see the below results: 2018-03-28 22:53:36,107 WARN (Camel (camel-1) thread #0 - JmsConsumer[personnel.records]) [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] - Setup of JMS message listener invoker failed for destination 'personnel.records' - trying to recover. Cause: java.io.EOFException 2018-03-28 22:53:36,109 ERROR (Camel (camel-1) thread #0 - JmsConsumer[personnel.records]) [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] - Could not refresh JMS Connection for destination 'personnel.records' - retrying using FixedBackOff{interval=60000, currentAttempts=0, maxAttempts=unlimited}. Cause: Could not connect to broker URL: tcp: //localhost:61616. Reason: java.net.ConnectException: Connection refused (Connection refused)

      Parent issue: https://issues.jboss.org/browse/ENTESB-2799

      The change in the above issue, provided a fix to refresh the connection.
      This causes a regression on the default 'retryInterval' working of camel-jms.

      The fix is not present in Apache Camel community version 2.17.0.

      Attached is a reproducer demonstrating the issue.

            janstey@redhat.com Jonathan Anstey
            rhn-support-vgohel Viral Gohel
            Viliam Kasala Viliam Kasala
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: