mirror of https://github.com/apache/kafka.git
SyncProducer should log host and port if can't connect; patched by Jun Rao; reviewed by Neha Narkhede; KAFKA-214
git-svn-id: https://svn.apache.org/repos/asf/incubator/kafka/trunk@1207642 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c65e771d47
commit
cb2564c45e
|
|
@ -174,10 +174,10 @@ class SyncProducer(val config: SyncProducerConfig) extends Logging {
|
|||
val endTimeMs = SystemTime.milliseconds
|
||||
if ( (endTimeMs - beginTimeMs + connectBackoffMs) > config.connectTimeoutMs)
|
||||
{
|
||||
error("Producer connection timing out after " + config.connectTimeoutMs + " ms", e)
|
||||
error("Producer connection to " + config.host + ":" + config.port + " timing out after " + config.connectTimeoutMs + " ms", e)
|
||||
throw e
|
||||
}
|
||||
error("Connection attempt failed, next attempt in " + connectBackoffMs + " ms", e)
|
||||
error("Connection attempt to " + config.host + ":" + config.port + " failed, next attempt in " + connectBackoffMs + " ms", e)
|
||||
SystemTime.sleep(connectBackoffMs)
|
||||
connectBackoffMs = min(10 * connectBackoffMs, MaxConnectBackoffMs)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue