Interface KafkaMessage


  • public interface KafkaMessage
    This interface represents a single kafka message.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getKey()
      Return the Kafka partition key.
      java.lang.String getValue()
      Return the value in the Kafka message.
      void setKey​(java.lang.String key)
      Set the Kafka partition key.
      void setValue​(java.lang.String value)
      Set the value in the Kafka message.
    • Method Detail

      • getKey

        java.lang.String getKey()
        Return the Kafka partition key.
        Returns:
        The Kafka partition key.
      • setKey

        void setKey​(java.lang.String key)
        Set the Kafka partition key.
        Parameters:
        key - The new Kafka partition key.
      • getValue

        java.lang.String getValue()
        Return the value in the Kafka message. Unless changed by another plugin, this value will be a valid JSON object formatted as a string.
        Returns:
        The value in the Kafka message.
      • setValue

        void setValue​(java.lang.String value)
        Set the value in the Kafka message. The value provided need not be JSON.
        Parameters:
        value - The new value in the Kafka message.