Skip to content

Commit 0bcf300

Browse files
committed
More logging
1 parent f70f5d3 commit 0bcf300

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/main/java/com/rabbitmq/client/amqp/impl/AmqpConnection.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,10 @@ TopologyListener createTopologyListener(AmqpConnectionBuilder builder) {
292292
BiConsumer<org.apache.qpid.protonj2.client.Connection, DisconnectionEvent> result =
293293
(conn, event) -> {
294294
ClientIOException ioex = event.failureCause();
295-
LOGGER.debug("Disconnect handler, error is the following: {}", ioex.getMessage());
295+
LOGGER.debug(
296+
"Disconnect handler of '{}', error is the following: {}",
297+
this.name(),
298+
ioex.getMessage());
296299
if (this.state() == OPENING) {
297300
LOGGER.debug("Connection is still opening, disconnect handler skipped");
298301
// the broker is not available when opening the connection
@@ -301,7 +304,7 @@ TopologyListener createTopologyListener(AmqpConnectionBuilder builder) {
301304
}
302305
if (this.recoveringConnection.get()) {
303306
LOGGER.debug(
304-
"Filtering recovery task enqueueing, connection recovery of '{}' in progress",
307+
"Filtering recovery task enqueueing, connection recovery of '{}' already in progress",
305308
this.name());
306309
return;
307310
}
@@ -336,18 +339,21 @@ private void recoverAfterConnectionFailure(
336339
AtomicReference<BiConsumer<org.apache.qpid.protonj2.client.Connection, DisconnectionEvent>>
337340
disconnectedHandlerReference) {
338341
LOGGER.info(
339-
"Connection '{}' to '{}' has been disconnected, trying to recover",
342+
"Connection '{}' to '{}' has been disconnected, trying to recover.",
340343
this.name(),
341344
this.currentConnectionLabel());
345+
LOGGER.debug("Notifying listeners of connection '{}'.", this.name());
342346
this.state(RECOVERING, failureCause);
343347
this.changeStateOfPublishers(RECOVERING, failureCause);
344348
this.changeStateOfConsumers(RECOVERING, failureCause);
345349
this.nativeConnection = null;
346350
this.nativeSession = null;
347351
this.connectionAddress = null;
352+
LOGGER.debug("Releasing management resource of connection '{}'.", this.name());
348353
this.releaseManagementResources();
349354
try {
350355
this.recoveringConnection.set(true);
356+
LOGGER.debug("Connection attempt for '{}'.", this.name());
351357
NativeConnectionWrapper ncw =
352358
recoverNativeConnection(
353359
recoveryConfiguration, connectionName, disconnectedHandlerReference);

0 commit comments

Comments
 (0)