Skip to content

Commit

Permalink
Improve warning message for ConsumerRecords filter strategy (#3556)
Browse files Browse the repository at this point in the history
  • Loading branch information
bky373 authored Oct 14, 2024
1 parent 6f4adb2 commit 3d507c7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
* @author Artem Bilan
* @author Wang Zhiyang
* @author Sanghyeok An
* @author Borahm Lee
*
* @see MethodKafkaListenerEndpoint
*/
Expand Down Expand Up @@ -537,8 +538,8 @@ private void setupMessageListener(MessageListenerContainer container,
if (this.recordFilterStrategy != null) {
if (isBatchListener()) {
if (((MessagingMessageListenerAdapter<K, V>) messageListener).isConsumerRecords()) {
this.logger.warn(() -> "Filter strategy ignored when consuming 'ConsumerRecords' instead of a List"
+ (this.id != null ? " id: " + this.id : ""));
this.logger.warn(() -> "Filter strategy is ignored when consuming 'ConsumerRecords' directly instead of a List of records."
+ (this.id != null ? " listenerId: " + this.id : ""));
}
else {
messageListener = new FilteringBatchMessageListenerAdapter<>(
Expand Down

0 comments on commit 3d507c7

Please sign in to comment.