Description
This is a follow up to the conversation here:
During ClientUtils.fetchTopicMetadata, if the broker is unavailable, socket.connect will block indeterminately. Any retry policy (message.send.max.retries) further increases the time spent waiting for the socket to connect.
The root fix is to add a connection timeout value to the BlockingChannel's socket configuration, like so:
-channel.socket.connect(new InetSocketAddress(host, port)) +channel.socket.connect(new InetSocketAddress(host, port), connectTimeoutMs)
The simplest thing to do here would be to have a constant, default value that would be applied to every socket configuration.
Is that acceptable?