You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "G Kal (Jira)" <ji...@apache.org> on 2022/05/02 19:55:00 UTC
[jira] [Commented] (CAMEL-17949) camel-netty-http - Infinite loop when setting retries
[ https://issues.apache.org/jira/browse/CAMEL-17949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17530929#comment-17530929 ]
G Kal commented on CAMEL-17949:
-------------------------------
Hello [~davsclaus], I created a minimal example attached above, hope it helps. As I found out, the "bug" doesn't occur when using an InOut exchange pattern.
> 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: G Kal
> 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)