TubeMQ has been donated to the Apache Software Foundation and renamed to InLong, please visit the new Apache repository: https://github.com/apache/incubator-inlong
when channel is null, it'll continue run the following code. It seems meaningless since
client can't send request when channel is null. I think maybe throw a RuntimeExcetion indicate channel is null is a better way.
Another problem here, currently, when send message asynchronously, it will build a Timeout after write data to channel. Since build a timeout may cause RuntimeException, it will trigger callback twice in this situaitons.
I found some confusing code in
NettyClient#call
.when channel is null, it'll continue run the following code. It seems meaningless since client can't send request when channel is null. I think maybe throw a
RuntimeExcetion
indicate channel is null is a better way.Another problem here, currently, when send message asynchronously, it will build a
Timeout
after write data to channel. Since build a timeout may causeRuntimeException
, it will trigger callback twice in this situaitons.