Interface KafkaRecordBatch<K,T>
-
- Type Parameters:
K
- The record key typeT
- The record payload type
- All Superinterfaces:
Iterable<KafkaRecord<K,T>>
,Message<List<T>>
- All Known Implementing Classes:
IncomingKafkaRecordBatch
public interface KafkaRecordBatch<K,T> extends Message<List<T>>, Iterable<KafkaRecord<K,T>>
Represents a batch of Kafka records received by polling theKafkaConsumer
This type extends theMessage<List<T>>
whereT
is the type of records' payloads. The complete list of Kafka record payloads are accessible via theMessage.getPayload()
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<org.apache.kafka.common.TopicPartition,KafkaRecord<K,T>>
getLatestOffsetRecords()
List<KafkaRecord<K,T>>
getRecords()
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.eclipse.microprofile.reactive.messaging.Message
ack, addMetadata, getAck, getMetadata, getMetadata, getNack, getPayload, nack, nack, unwrap, withAck, withMetadata, withMetadata, withNack, withPayload
-
-
-
-
Method Detail
-
getRecords
List<KafkaRecord<K,T>> getRecords()
- Returns:
- list of records contained in this message batch
-
getLatestOffsetRecords
Map<org.apache.kafka.common.TopicPartition,KafkaRecord<K,T>> getLatestOffsetRecords()
- Returns:
- map of records with latest offset by topic partition
-
-