mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
when invoke connect(), it will return a ChannelFuture instance, and then the "addListener" method is invoked by biz thread, however, "channelRead" method in BusinessHandler is executed by netty I/O thread. ChannelFutureListener -> operationComplete() cannot guarantee that which is executed before than BusinessHandler -> channelRead() method. reproduce it : set below jvm parameter: -Dio.netty.eventLoopThreads=1 It will caused new connection is timeout when AbstractEventParser -> start() -> parseThread ->erosaConnection.reconnect() is invoked.