[ 
https://issues.apache.org/jira/browse/CAMEL-17949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17544181#comment-17544181
 ] 

Claus Ibsen commented on CAMEL-17949:
-------------------------------------

Only contributors whom have done more work can assign tickets. Until then you 
just write a comment that you work on this.

> camel-netty-http - Infinite loop when setting retries
> -----------------------------------------------------
>
>                 Key: CAMEL-17949
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17949
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-netty-http
>    Affects Versions: 3.14.2
>            Reporter: Gerasimos Kalouris
>            Priority: Major
>         Attachments: netty-http-bug.zip
>
>
> 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.
> {code:java}
>     onException(NettyHttpOperationFailedException.class)
>         .maximumRedeliveries(2)
>         .retryAttemptedLogLevel(LoggingLevel.WARN)
>         .backOffMultiplier(5)
>         .maximumRedeliveryDelay(500)
>         .useExponentialBackOff()
>         .handled(false);
> {code}
> {noformat}
> 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
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to