[
https://issues.apache.org/jira/browse/CAMEL-16718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17363574#comment-17363574
]
Claus Ibsen commented on CAMEL-16718:
-------------------------------------
Where do you see a thread is hanging? I cannot easily reproduce this. I have
the mock endpoint receive 2 messages, the big and then the small message.
However during shutdown netty does report an exception of shutting down its
channel pool.
{code}
ERROR 2021-06-15 12:59:51,139 14951
io.netty.util.concurrent.DefaultPromise.rejectedExecution [main] Failed
to submit a listener notification task. Event loop shut down?
java.util.concurrent.RejectedExecutionException: event executor terminated
at
io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:926)
at
io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:353)
at
io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:346)
at
io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:828)
at
io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:818)
at
io.netty.util.concurrent.DefaultPromise.safeExecute(DefaultPromise.java:842)
at
io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:499)
at
io.netty.util.concurrent.DefaultPromise.addListener(DefaultPromise.java:184)
at
io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:95)
at
io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:30)
at
org.apache.camel.component.netty.NettyProducer$NettyProducerPoolableObjectFactory.destroyObject(NettyProducer.java:599)
at
org.apache.camel.component.netty.NettyProducer$NettyProducerPoolableObjectFactory.destroyObject(NettyProducer.java:577)
at
org.apache.commons.pool.impl.GenericObjectPool.destroy(GenericObjectPool.java:1339)
at
org.apache.commons.pool.impl.GenericObjectPool.clear(GenericObjectPool.java:1324)
at
org.apache.commons.pool.impl.GenericObjectPool.close(GenericObjectPool.java:1495)
at
org.apache.camel.component.netty.NettyProducer.doStop(NettyProducer.java:194)
{code}
> Conflict with Netty TCP + Resilience4J circuit breaker
> ------------------------------------------------------
>
> Key: CAMEL-16718
> URL: https://issues.apache.org/jira/browse/CAMEL-16718
> Project: Camel
> Issue Type: Bug
> Components: camel-netty
> Affects Versions: 3.7.4, 3.10.0
> Reporter: Morgan L
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.11.0
>
> Attachments: sample-camel.zip
>
>
> My team has found what we believe is a conflict between the Netty TCP
> producer and the Resilience4J circuit breaker, under specific circumstances.
> When the Netty TCP client encounters an error while writing to the server
> (for us, usually a broken pipe exception), if it is inside a circuit breaker,
> the route will hang indefinitely.
> Discussion on Zulip: [Conflict with Netty TCP + Resilience4J circuit
> breaker|https://camel.zulipchat.com/#narrow/stream/257298-camel/topic/Conflict.20with.20Netty.20TCP.20.2B.20Resilience4J.20circuit.20breaker]
> A zipped version of the complete test project is attached. It should allow
> you to reproduce the issue.
> By running BrokeTCPServer.main(), and then invoking
> NettyTest.testNettyCircuitBreaker(), you should see that of the two messages
> we push into the queue, only one is processed. Only one connection is
> initiated to the BrokeTCPServer.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)