Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17949

camel-netty-http - Infinite loop when setting retries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.14.2
    • 3.14.4, 3.18.0
    • camel-netty-http
    • None
    • Unknown

    Description

      When setting re-deliveries in case of `NettyHttpOperationFailedException` it seems that the exchange is submitted back to netty's executor group without incrementing the attempts counter, resulting to an infinite loop. This example works as expected when using the `camel-http` component.

          onException(NettyHttpOperationFailedException.class)
              .maximumRedeliveries(2)
              .retryAttemptedLogLevel(LoggingLevel.WARN)
              .backOffMultiplier(5)
              .maximumRedeliveryDelay(500)
              .useExponentialBackOff()
              .handled(false);
      
      12-04-2022 17:41:57[Test worker] [INFO ] o.a.camel.test.junit5.CamelTestSupport - Testing: retry_when_destination_fails_to_consume() (route.WebhooksRouteBuilderTest)
      12-04-2022 17:41:57[Test worker] [INFO ] o.a.camel.test.junit5.CamelTestSupport - ********************************************************************************
      12-04-2022 17:41:59[Test worker] [INFO ] o.a.camel.component.netty.NettyComponent - Creating shared NettyConsumerExecutorGroup with 25 threads
      12-04-2022 17:41:59[Test worker] [INFO ] o.a.c.impl.engine.AbstractCamelContext - Routes startup (total:1 started:1)
      12-04-2022 17:41:59[Test worker] [INFO ] o.a.c.impl.engine.AbstractCamelContext -     Started mo-webhook (direct://mo-queue)
      12-04-2022 17:41:59[Test worker] [INFO ] o.a.c.impl.engine.AbstractCamelContext - Apache Camel 3.14.2 (camel-1) started in 450ms (build:116ms init:225ms start:109ms)
      12-04-2022 17:42:02[Camel Thread #1 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 0 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:02[Camel Thread #2 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:03[Camel Thread #3 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:03[Camel Thread #4 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:04[Camel Thread #5 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:04[Camel Thread #6 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:05[Camel Thread #7 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:05[Camel Thread #8 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:06[Camel Thread #9 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:06[Camel Thread #10 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:07[Camel Thread #11 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      12-04-2022 17:42:07[Camel Thread #12 - NettyClientTCPWorker] [WARN ] o.a.c.p.errorhandler.DefaultErrorHandler - Failed delivery for (MessageId: 0C03F6022475684-0000000000000000 on ExchangeId: 0C03F6022475684-0000000000000000). On delivery attempt: 1 caught: org.apache.camel.component.netty.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 500
      

      Attachments

        1. netty-http-bug.zip
          63 kB
          Gerasimos Kalouris

        Issue Links

          Activity

            People

              orpiske Otavio Rodolfo Piske
              memas.kal Gerasimos Kalouris
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: