Class KafkaProducerMessage<K,​V>

  • Type Parameters:
    K - the type of Kafka record key
    V - the type of Kafka record value
    All Implemented Interfaces:
    KafkaMessage<K,​V>, Message<V>

    public class KafkaProducerMessage<K,​V>
    extends Object
    implements KafkaMessage<K,​V>
    Kafka specific Micro Profile Reactive Messaging Producer Message.
    • Method Detail

      • getOffset

        public Optional<Long> getOffset()
        Description copied from interface: KafkaMessage
        Offset of the record in partition from which was this message received.
        Specified by:
        getOffset in interface KafkaMessage<K,​V>
        Returns:
        offset number
      • getConsumerRecord

        public Optional<org.apache.kafka.clients.consumer.ConsumerRecord<K,​V>> getConsumerRecord()
        Description copied from interface: KafkaMessage
        Returns ConsumerRecord if message was received from Kafka, otherwise return Optional.empty().
        Specified by:
        getConsumerRecord in interface KafkaMessage<K,​V>
        Returns:
        ConsumerRecord or Optional.empty()
      • getKey

        public Optional<K> getKey()
        Description copied from interface: KafkaMessage
        Key or Optional.empty() if non is specified.
        Specified by:
        getKey in interface KafkaMessage<K,​V>
        Returns:
        Key or Optional.empty()
      • getHeaders

        public org.apache.kafka.common.header.Headers getHeaders()
        Description copied from interface: KafkaMessage
        Returns Headers received from Kafka with record or empty headers if message was not created by Kafka connector.
        Specified by:
        getHeaders in interface KafkaMessage<K,​V>
        Returns:
        Headers received from Kafka or empty headers if message was not created by Kafka connector