Skip to content

Commit c321b80

Browse files
committed
Improve warning message for ConsumerRecords filter strategy
1 parent 6f4adb2 commit c321b80

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-kafka/src/main/java/org/springframework/kafka/config/AbstractKafkaListenerEndpoint.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
* @author Artem Bilan
6464
* @author Wang Zhiyang
6565
* @author Sanghyeok An
66+
* @author Borahm Lee
6667
*
6768
* @see MethodKafkaListenerEndpoint
6869
*/
@@ -537,8 +538,8 @@ private void setupMessageListener(MessageListenerContainer container,
537538
if (this.recordFilterStrategy != null) {
538539
if (isBatchListener()) {
539540
if (((MessagingMessageListenerAdapter<K, V>) messageListener).isConsumerRecords()) {
540-
this.logger.warn(() -> "Filter strategy ignored when consuming 'ConsumerRecords' instead of a List"
541-
+ (this.id != null ? " id: " + this.id : ""));
541+
this.logger.warn(() -> "Filter strategy is ignored when consuming 'ConsumerRecords' directly instead of a List of records."
542+
+ (this.id != null ? " listenerId: " + this.id : ""));
542543
}
543544
else {
544545
messageListener = new FilteringBatchMessageListenerAdapter<>(

0 commit comments

Comments
 (0)