Original issue description
Integration test (not available here).
The broker runs in docker container, then goes down and corresponding DNS entry becomes unavailable. After the first attempt to reconnect the NettyTcpConnection gets UnknownHostException from NetResolver and fails to schedule next reconnection attempt.
Describe your changes
Modify NetResolver to not throw UnknownHostException.
This way NettyTcpConnection may continue its attempts to (re)connect even if there are temporarily DNS issues (which may disappear in a second).
The proposed solution is not perfect.
Ideally, in case of unknown host it's better to skip connection attempt at all and just schedule the next one but this will require to modify NettyTcpConnection (connect/disconnect callbacks) and corresponding tests.
Testing performed
Manually tested by starting/stopping broker and modifying /etc/hosts records
Original issue description Integration test (not available here). The broker runs in docker container, then goes down and corresponding DNS entry becomes unavailable. After the first attempt to reconnect the
NettyTcpConnection
getsUnknownHostException
fromNetResolver
and fails to schedule next reconnection attempt.Describe your changes Modify
NetResolver
to not throwUnknownHostException
. This wayNettyTcpConnection
may continue its attempts to (re)connect even if there are temporarily DNS issues (which may disappear in a second).The proposed solution is not perfect. Ideally, in case of unknown host it's better to skip connection attempt at all and just schedule the next one but this will require to modify
NettyTcpConnection
(connect/disconnect callbacks) and corresponding tests.Testing performed Manually tested by starting/stopping broker and modifying
/etc/hosts
records