ARTEMIS-3035 Log.info on connection success for AMQP Broker Connection

This commit is contained in:
Clebert Suconic 2020-12-16 13:40:57 -05:00
parent 3d32f5ce98
commit 57c9dc623c
2 changed files with 9 additions and 0 deletions

View File

@ -233,6 +233,7 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
return;
}
int currentRetryCounter = retryCounter;
reconnectFuture = null;
retryCounter = 0;
@ -284,6 +285,8 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
bridgeManager.connected(connection, this);
ActiveMQAMQPProtocolLogger.LOGGER.successReconnect(brokerConnectConfiguration.getName(), host + ":" + port, currentRetryCounter);
connecting = false;
} catch (Throwable e) {
error(e);

View File

@ -60,4 +60,10 @@ public interface ActiveMQAMQPProtocolLogger extends BasicLogger {
"\nRetrying Server AMQP Connection {0} on {1} retry {2} of {3}" +
"\n*******************************************************************************************************************************\n", format = Message.Format.MESSAGE_FORMAT)
void retryConnection(String name, String hostAndPort, int currentRetry, int maxRetry);
@LogMessage(level = Logger.Level.INFO)
@Message(id = 111003, value = "\n*******************************************************************************************************************************" +
"\nSuccess on Server AMQP Connection {0} on {1} after {2} retries" +
"\n*******************************************************************************************************************************\n", format = Message.Format.MESSAGE_FORMAT)
void successReconnect(String name, String hostAndPort, int currentRetry);
}