Interface BatchMessageListener<K,​V>

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method 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.
    • Method Detail

      • onMessage

        default void onMessage​(org.apache.kafka.clients.consumer.ConsumerRecords<K,​V> records,
                               @Nullable
                               Acknowledgment acknowledgment,
                               org.apache.kafka.clients.consumer.Consumer<K,​V> consumer)
        Listener receives the original ConsumerRecords object instead of a list of ConsumerRecord.
        Parameters:
        records - the records.
        acknowledgment - the acknowledgment (null if not manual acks)
        consumer - the consumer.
        Since:
        2.2
      • wantsPollResult

        default boolean wantsPollResult()
        Return true if this listener wishes to receive the original ConsumerRecords object instead of a list of ConsumerRecord.
        Returns:
        true for consumer records.
        Since:
        2.2