You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by si...@yahoo.com.INVALID on 2017/12/27 15:17:33 UTC

Camel unable to shutdown gracefully because Netty4 consumer keep receiving and adding inflight exchanges

Hi,




So, I'm using this URI: `netty4:tcp://localhost:8888?sync=false&textline=true`


I have this issue when initiating Camel shutdown using `DefaultShutdownStrategy`:


1. Camel suspends `NettyConsumer` (`SingleTCPNettyServerBootstrapFactory`), which only stops the "main" Netty channel, but _not_ the other Netty channels (i.e. socket connections)
2. Camel waits for routes to be empty of inflight & pending exchanges
3. (!) Those other Netty channels kept receiving data, which are turned into new exchanges
** As long as the TCP clients keep sending data into the channels + exchanges completing slower than send rate, routes will _never_ be empty of inflight & pending exchanges
4. Forced shutdown after 5 minutes (timed out)


I have some scripts to simulate the issue - they are in https://issues.apache.org/jira/browse/CAMEL-12103.


Did I configure (or didn’t configure) something wrongly, or this is a bug?


p/s: Sorry for the faux pas of creating a ticket before sending an email here.