[
https://issues.apache.org/jira/browse/CAMEL-16178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-16178:
--------------------------------
Fix Version/s: 3.9.0
> Enrich with REST+netty hangs when connection is closed without response
> -----------------------------------------------------------------------
>
> Key: CAMEL-16178
> URL: https://issues.apache.org/jira/browse/CAMEL-16178
> Project: Camel
> Issue Type: Bug
> Affects Versions: 3.4.5, 3.7.2
> Reporter: Krzysztof Jamróz
> Priority: Major
> Fix For: 3.9.0
>
> Attachments: EnrichWithoutRestResponseTest.java
>
>
> Enricher hangs when used with REST endpoint utilizing netty when there is no
> response from the server but the server immediately closes the connection. In
> such case read timeout is ignored as connection is already closed.
>
> The reason of this behavior is that
> {{org.apache.camel.component.netty.handlers.ClientChannelHandler.channelInactive}}
> contains following conditions for callback invocation when there was no
> response:
> {code:java}
> configuration.isSync() && !doneUoW && !messageReceived && !exceptionHandled
> {code}
> where
> {code:java}
> doneUoW = exchange.getUnitOfWork() == null
> {code}
> It works as expected when initially there had been UoW in Exchange (this is
> the case when using {{to}}). However, enricher by default (and by design)
> clears UoW for exchange it creates and this breaks above check.
> Setting {{shareUnitOfWork}} for {{enrich}} works around the problem.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)