From 6e79c12aa1d55fdc02caa91e884b5ecacae41ff1 Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Fri, 23 Jun 2023 14:18:04 -0400 Subject: [PATCH] Debug logs for failed messages Resolves https://github.com/spring-projects/spring-pulsar/issues/416 --- .../pulsar/listener/DefaultPulsarMessageListenerContainer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-pulsar/src/main/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainer.java b/spring-pulsar/src/main/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainer.java index 8c6b1e93..eb2e8eb8 100644 --- a/spring-pulsar/src/main/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainer.java +++ b/spring-pulsar/src/main/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainer.java @@ -493,6 +493,8 @@ else if (this.listener != null) { inRetryMode.compareAndSet(true, false); } catch (Exception e) { + DefaultPulsarMessageListenerContainer.this.logger.debug(e, + () -> "Error dispatching the message to the listener."); if (this.pulsarConsumerErrorHandler != null) { invokeRecordListenerErrorHandler(inRetryMode, message, e); }