Skip to content

Commit c168086

Browse files
committed
Add log message if consumer recovery fails
1 parent 094db28 commit c168086

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ private void recoverAfterConnectionFailure(
388388
this.state(OPEN);
389389
} catch (Exception ex) {
390390
// likely InterruptedException or IO exception
391-
LOGGER.info(
391+
LOGGER.warn(
392392
"Error while trying to recover topology for connection '{}': {}",
393393
this.name(),
394394
ex.getMessage());
@@ -479,10 +479,14 @@ private void recoverConsumers() throws InterruptedException {
479479
try {
480480
LOGGER.debug("Recovering consumer {} (queue '{}')", consumer.id(), consumer.queue());
481481
consumer.recoverAfterConnectionFailure();
482-
483482
consumer.state(OPEN);
484483
LOGGER.debug("Recovered consumer {} (queue '{}')", consumer.id(), consumer.queue());
485484
} catch (AmqpException.AmqpConnectionException ex) {
485+
LOGGER.warn(
486+
"Connection error while trying to recover consumer {} (queue '{}'), restarting recovery",
487+
consumer.id(),
488+
consumer.queue(),
489+
ex);
486490
throw ex;
487491
} catch (Exception ex) {
488492
LOGGER.warn(

0 commit comments

Comments
 (0)