Class KafkaMessage<K,V>

java.lang.Object
io.micronaut.configuration.kafka.KafkaMessage<K,V>
Type Parameters:
K - The key type
V - The value type

public final class KafkaMessage<K,V> extends Object
Message payload representation.
Since:
4.1.0
Author:
Denis Stepanov
  • Constructor Details

    • KafkaMessage

      public KafkaMessage(@Nullable String topic, @Nullable K key, @Nullable V body, @Nullable Integer partition, @Nullable Long timestamp, @Nullable Map<String,Object> headers)
      The default constructor.
      Parameters:
      topic - The topic
      key - The key
      body - The body
      partition - The partition
      timestamp - The timestamp
      headers - The headers
  • Method Details

    • getTopic

      public @Nullable String getTopic()
    • getKey

      public @Nullable K getKey()
    • getBody

      public @Nullable V getBody()
    • getPartition

      public @Nullable Integer getPartition()
    • getTimestamp

      public @Nullable Long getTimestamp()
    • getHeaders

      public @Nullable Map<String,Object> getHeaders()