[consumer] adjust log for locate problem and format code
@@ -1693,6 +1693,7 @@ public class ConsumerImpl<T> extends ConsumerBase<T> implements ConnectionHandle
});
}
}).exceptionally(ex -> {
+ log.error("Dead letter producer exception with topic: {}", deadLetterPolicy.getDeadLetterTopic(), ex);
deadLetterProducer = null;
result.complete(false);
return null;
@@ -1713,8 +1714,6 @@ public class ConsumerImpl<T> extends ConsumerBase<T> implements ConnectionHandle
.blockIfQueueFull(false)
.createAsync();
}
- } catch (Exception e) {
- log.error("Create dead letter producer exception with topic: {}", deadLetterPolicy.getDeadLetterTopic(), e);
} finally {
createProducerLock.writeLock().unlock();
}
