Class IncomingKafkaRecordMetadata<K,​T>

  • Type Parameters:
    K - The Kafka record key type
    T - The payload type
    All Implemented Interfaces:
    KafkaMessageMetadata<K>
    Direct Known Subclasses:
    IncomingKafkaRecordMetadata

    public class IncomingKafkaRecordMetadata<K,​T>
    extends Object
    implements KafkaMessageMetadata<K>
    Contains information about messages received from a channel backed by Kafka. Generally this will be created by the framework, and users should not construct instances of this class.
    • Constructor Detail

      • IncomingKafkaRecordMetadata

        public IncomingKafkaRecordMetadata​(org.apache.kafka.clients.consumer.ConsumerRecord<K,​T> record)
        Constructor
        Parameters:
        record - the underlying record received from Kafka
    • Method Detail

      • getTimestampType

        public org.apache.kafka.common.record.TimestampType getTimestampType()
        Get the timestamp type
        Returns:
        the timestamp type
      • getOffset

        public long getOffset()
        Get the offset
        Returns:
        the offset
      • getHeaders

        public org.apache.kafka.common.header.Headers getHeaders()
        Get the Kafka headers
        Specified by:
        getHeaders in interface KafkaMessageMetadata<K>
        Returns:
        the Kafka headers
      • getRecord

        public org.apache.kafka.clients.consumer.ConsumerRecord<K,​T> getRecord()
        Get the underlying Kafka ConsumerRecord
        Returns:
        the underlying Kafka ConsumerRecord