Skip to content

Commit 1071c3c

Browse files
mitchmcd18spring-builds
authored andcommitted
GH-9705: AbstractReplyProducingMessageHandler: check for logging enabled
Fixes: #9705 Issue link: #9705 Currently when any class that implements `AbstractReplyProducingMessageHandler` doesn't produce a reply it will log the message, even if no reply is required. The message should only be logged if `isLoggingEnabled()` returns true as a handler that doesn't require a reply may be a normal operation that is expected, and if we've set `loggingEnabled` to false it shouldn't log the message. * Prevent logging when no reply is provided for an `AbstractReplyProducingMessageHandler` if logging is disabled (cherry picked from commit 7fc104a)
1 parent a10814d commit 1071c3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-integration-core/src/main/java/org/springframework/integration/handler/AbstractReplyProducingMessageHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ else if (this.requiresReply && !isAsync()) {
154154
throw new ReplyRequiredException(message, "No reply produced by handler '" +
155155
getComponentName() + "', and its 'requiresReply' property is set to true.");
156156
}
157-
else if (!isAsync()) {
157+
else if (!isAsync() && isLoggingEnabled()) {
158158
logger.debug(LogMessage.format("handler '%s' produced no reply for request Message: %s", this, message));
159159
}
160160
}

0 commit comments

Comments
 (0)