Interface KafkaRecordBatch<K,T>
- Type Parameters:
K- The record key typeT- The record payload type
- All Superinterfaces:
ContextAwareMessage<List<T>>,Iterable<KafkaRecord<K,,T>> org.eclipse.microprofile.reactive.messaging.Message<List<T>>
- All Known Implementing Classes:
IncomingKafkaRecordBatch
public interface KafkaRecordBatch<K,T>
extends org.eclipse.microprofile.reactive.messaging.Message<List<T>>, Iterable<KafkaRecord<K,T>>, ContextAwareMessage<List<T>>
Represents a batch of Kafka records received by polling the
KafkaConsumer
This type extends the Message<List<T>> where T is the type of records' payloads.
The complete list of Kafka record payloads are accessible via the Message.getPayload() method.
-
Field Summary
Fields inherited from interface org.eclipse.microprofile.reactive.messaging.Message
EMPTY_ACK, EMPTY_NACK, LOGGER -
Method Summary
Modifier and TypeMethodDescriptionMap<org.apache.kafka.common.TopicPartition,KafkaRecord<K, T>> List<KafkaRecord<K,T>> Methods inherited from interface io.smallrye.reactive.messaging.providers.locals.ContextAwareMessage
getContextMetadata, runOnMessageContextMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.eclipse.microprofile.reactive.messaging.Message
ack, ack, addMetadata, getAck, getAckWithMetadata, getMetadata, getMetadata, getNack, getNackWithMetadata, getPayload, nack, nack, thenApply, unwrap, withAck, withAckWithMetadata, withMetadata, withMetadata, withNack, withNackWithMetadata, withPayload
-
Method Details
-
getRecords
List<KafkaRecord<K,T>> getRecords()- Returns:
- list of records contained in this message batch
-
getLatestOffsetRecords
Map<org.apache.kafka.common.TopicPartition,KafkaRecord<K, getLatestOffsetRecords()T>> - Returns:
- map of records with latest offset by topic partition
-