Interface KafkaMessage

All Superinterfaces:
Message

public interface KafkaMessage extends Message
  • Method Details

    • recordHeaders

      Map<String,Buffer> recordHeaders()
      FIXME: Refactor/remove this method when Message.headers() are http agnostic Get the Kafka record headers associated to the message.
      Returns:
      the Kafka headers
    • putRecordHeader

      KafkaMessage putRecordHeader(String key, Buffer value)
      FIXME: Refactor/remove this method when Message.headers(HttpHeaders) are http agnostic Put a Kafka record header to the message.
      Parameters:
      key - the header key
      value - the header value
      Returns:
      reference to itself for easily chain calls.
    • removeRecordHeader

      KafkaMessage removeRecordHeader(String key)
      FIXME: Refactor/remove this method when Message.headers(HttpHeaders) are http agnostic Remove a Kafka record header from the message.
      Parameters:
      key -
      Returns:
    • key

      Buffer key()
      Get the Kafka record key associated to the message.
      Returns:
      the Kafka key
    • key

      KafkaMessage key(Buffer key)
      Set the Kafka record key associated with the message. Allows modification of the Kafka key.
      Parameters:
      key - the buffer representing the Kafka key
      Returns:
      reference to itself for easily chain calls.
    • key

      KafkaMessage key(String key)
      Overloaded setter for the Kafka key accepting a String.
      Parameters:
      key - the string representing the Kafka key
      Returns:
      reference to itself for easily chain calls.
    • offset

      long offset()
      Get the Kafka record offset value associated to the message.
      Returns:
      the Kafka offset
    • sequence

      int sequence()
      Get the Kafka record partition value associated to the message.
      Returns:
      the Kafka partition
    • indexPartition

      int indexPartition()
      Get the Kafka record indexPartition type value associated to the message.
      Returns:
      the Kafka indexPartition
    • topic

      String topic()
      Get the Kafka record topic value associated to the message.
      Returns:
      the Kafka topic
    • sizeInBytes

      int sizeInBytes()
      Get the size in bytes of that message.
      Returns:
      the size in bytes
    • ack

      @Deprecated default void ack()
      Deprecated.
      Description copied from interface: Message
      MUST be called to acknowledge this message when it has been well-processed.
      Specified by:
      ack in interface Message
    • headers

      @Deprecated default HttpHeaders headers()
      Deprecated.
      Description copied from interface: Message
      Get the headers of the message.
      Specified by:
      headers in interface Message
      Returns:
      a read-write map of headers.
    • headers

      @Deprecated default Message headers(HttpHeaders headers)
      Deprecated.
      Description copied from interface: Message
      Set the headers of the message.
      Specified by:
      headers in interface Message
      Parameters:
      headers - the headers to set on the message.
      Returns:
      reference to itself for easily chain calls.