Class IncomingKafkaRecordBatchMetadata<K,T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.kafka.api.IncomingKafkaRecordBatchMetadata<K,T>
-
- Type Parameters:
K- The record key typeT- The record payload type
public class IncomingKafkaRecordBatchMetadata<K,T> extends Object
Contains information about the batch of messages received from a channel backed by Kafka. Encapsulates underlying KafkaConsumerRecordsreceived from the consumer client. As this is an incoming message metadata it is created by the framework and injected into incoming batch messages.
-
-
Constructor Summary
Constructors Constructor Description IncomingKafkaRecordBatchMetadata(org.apache.kafka.clients.consumer.ConsumerRecords<K,T> records)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcount()org.apache.kafka.clients.consumer.ConsumerRecords<K,T>getRecords()Set<org.apache.kafka.common.TopicPartition>partitions()
-
-
-
Method Detail
-
getRecords
public org.apache.kafka.clients.consumer.ConsumerRecords<K,T> getRecords()
- Returns:
- the underlying Kafka
ConsumerRecords
-
count
public int count()
- Returns:
- the total number of records for all topic partitions
-
partitions
public Set<org.apache.kafka.common.TopicPartition> partitions()
- Returns:
- the set of topic partitions with data in this record batch
-
-