Merge pull request #13709 from smatvienko-tb/hotfix/MqttClient-reduce-log-severity-for-reconnect
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:
commit
d4ec53aab4
@ -192,14 +192,14 @@ final class MqttClientImpl implements MqttClient {
|
||||
}
|
||||
|
||||
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 (reconnect) {
|
||||
this.reconnect = true;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user