Skip to content
Permalink
Browse files
ARTEMIS-3676 ignore NoRouteToHostException
This kind of exception can be common in cloud environments and should be
ignored for logging just like ConnectException.
  • Loading branch information
jbertram authored and clebertsuconic committed Mar 21, 2022
1 parent d0c550b commit 842ac1df5d95e6db5faf0cca105d8f9dbf545df0
Showing 1 changed file with 2 additions and 1 deletion.
@@ -24,6 +24,7 @@
import java.net.ConnectException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.NoRouteToHostException;
import java.net.SocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
@@ -951,7 +952,7 @@ public NettyConnection createConnection(Consumer<ChannelFuture> onConnect, Strin
} else {
Throwable t = future.cause();

if (t != null && !(t instanceof ConnectException)) {
if (t != null && !(t instanceof ConnectException) && !(t instanceof NoRouteToHostException)) {
ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(future.cause());
}

0 comments on commit 842ac1d

Please sign in to comment.