K - the key type.V - the value type.@FunctionalInterface public interface BatchMessageListener<K,V> extends GenericMessageListener<java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>>
| Modifier and Type | Method and Description |
|---|---|
default void |
onMessage(org.apache.kafka.clients.consumer.ConsumerRecords<K,V> records,
Acknowledgment acknowledgment,
org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
Listener receives the original
ConsumerRecords object instead of a
list of ConsumerRecord. |
default boolean |
wantsPollResult()
Return true if this listener wishes to receive the original
ConsumerRecords
object instead of a list of ConsumerRecord. |
onMessage, onMessage, onMessage, onMessagedefault void onMessage(org.apache.kafka.clients.consumer.ConsumerRecords<K,V> records, @Nullable Acknowledgment acknowledgment, org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
ConsumerRecords object instead of a
list of ConsumerRecord.records - the records.acknowledgment - the acknowledgment (null if not manual acks)consumer - the consumer.default boolean wantsPollResult()
ConsumerRecords
object instead of a list of ConsumerRecord.