Reduced log severity to debug for Scheduling reconnect message to avoid log flood under high-load. Logs are made more informative.
This commit is contained in:
parent
b656f029ac
commit
480b89c11c
@ -192,14 +192,14 @@ final class MqttClientImpl implements MqttClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void scheduleConnectIfRequired(String host, int port, boolean reconnect) {
|
private void scheduleConnectIfRequired(String host, int port, boolean reconnect) {
|
||||||
log.trace("[{}] Scheduling connect to server, isReconnect - {}", channel != null ? channel.id() : "UNKNOWN", reconnect);
|
log.trace("[{}][{}][{}] Scheduling connect to server, isReconnect - {}", host, port, channel != null ? channel.id() : "UNKNOWN", reconnect);
|
||||||
if (clientConfig.isReconnect() && !disconnected) {
|
if (clientConfig.isReconnect() && !disconnected) {
|
||||||
if (reconnect) {
|
if (reconnect) {
|
||||||
this.reconnect = true;
|
this.reconnect = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
final long nextReconnectDelay = reconnectStrategy.getNextReconnectDelay();
|
final long nextReconnectDelay = reconnectStrategy.getNextReconnectDelay();
|
||||||
log.info("[{}] Scheduling reconnect in [{}] sec", channel != null ? channel.id() : "UNKNOWN", nextReconnectDelay);
|
log.debug("[{}][{}][{}] Scheduling reconnect in [{}] sec", host, port, channel != null ? channel.id() : "UNKNOWN", nextReconnectDelay);
|
||||||
eventLoop.schedule((Runnable) () -> connect(host, port, reconnect), nextReconnectDelay, TimeUnit.SECONDS);
|
eventLoop.schedule((Runnable) () -> connect(host, port, reconnect), nextReconnectDelay, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user