Class KafkaHeaders

java.lang.Object
org.springframework.kafka.support.KafkaHeaders

public abstract class KafkaHeaders extends Object
The Kafka specific message headers constants.
Author:
Artem Bilan, Marius Bogoevici, Gary Russell, Biju Kunjummen
  • Field Details

    • PREFIX

      public static final String PREFIX
      The prefix for Kafka headers.
      See Also:
    • RECEIVED

      public static final String RECEIVED
      The prefix for Kafka headers containing 'received' values.
      See Also:
    • TOPIC

      public static final String TOPIC
      The header containing the topic when sending data to Kafka.
      See Also:
    • KEY

      public static final String KEY
      The header containing the record key when sending data to Kafka.
      Since:
      2.9
      See Also:
    • PARTITION

      public static final String PARTITION
      The header containing the topic partition when sending data to Kafka.
      Since:
      2.0
      See Also:
    • OFFSET

      public static final String OFFSET
      The header for the partition offset.
      See Also:
    • RAW_DATA

      public static final String RAW_DATA
      The header containing the raw data received from Kafka (ConsumerRecord or ConsumerRecords). Usually used to enhance error messages.
      See Also:
    • RECORD_METADATA

      public static final String RECORD_METADATA
      The header containing the RecordMetadata object after successful send to the topic.
      See Also:
    • ACKNOWLEDGMENT

      public static final String ACKNOWLEDGMENT
      The header for the Acknowledgment.
      See Also:
    • CONSUMER

      public static final String CONSUMER
      The header for the Consumer object.
      See Also:
    • RECEIVED_TOPIC

      public static final String RECEIVED_TOPIC
      The header containing the topic from which the message was received.
      See Also:
    • RECEIVED_KEY

      public static final String RECEIVED_KEY
      The header containing the record key from the received message.
      Since:
      2.9
      See Also:
    • RECEIVED_PARTITION

      public static final String RECEIVED_PARTITION
      The header containing the topic partition from the received message.
      Since:
      2.9
      See Also:
    • TIMESTAMP_TYPE

      public static final String TIMESTAMP_TYPE
      The header for holding the type of timestamp.
      See Also:
    • TIMESTAMP

      public static final String TIMESTAMP
      The header for holding the timestamp of the producer record.
      See Also:
    • RECEIVED_TIMESTAMP

      public static final String RECEIVED_TIMESTAMP
      The header for holding the timestamp of the consumer record.
      See Also:
    • NATIVE_HEADERS

      public static final String NATIVE_HEADERS
      The header for holding the native headers of the consumer record; only provided if no header mapper is present.
      See Also:
    • BATCH_CONVERTED_HEADERS

      public static final String BATCH_CONVERTED_HEADERS
      The header for a list of Maps of converted native Kafka headers. Used for batch listeners; the map at a particular list position corresponds to the data in the payload list position.
      See Also:
    • CORRELATION_ID

      public static final String CORRELATION_ID
      The header containing information to correlate requests/replies. Type: byte[].
      Since:
      2.1.3
      See Also:
    • REPLY_TOPIC

      public static final String REPLY_TOPIC
      The header containing the default reply topic. Type: byte[].
      Since:
      2.1.3
      See Also:
    • REPLY_PARTITION

      public static final String REPLY_PARTITION
      The header containing a partition number on which to send the reply. Type: binary (int) in byte[].
      Since:
      2.1.3
      See Also:
    • DLT_EXCEPTION_FQCN

      public static final String DLT_EXCEPTION_FQCN
      Exception class name for a record published sent to a dead-letter topic.
      Since:
      2.2
      See Also:
    • DLT_EXCEPTION_CAUSE_FQCN

      public static final String DLT_EXCEPTION_CAUSE_FQCN
      Exception cause class name for a record published sent to a dead-letter topic.
      Since:
      2.8
      See Also:
    • DLT_EXCEPTION_STACKTRACE

      public static final String DLT_EXCEPTION_STACKTRACE
      Exception stack trace for a record published to a dead-letter topic.
      Since:
      2.2
      See Also:
    • DLT_EXCEPTION_MESSAGE

      public static final String DLT_EXCEPTION_MESSAGE
      Exception message for a record published to a dead-letter topic.
      Since:
      2.2
      See Also:
    • DLT_KEY_EXCEPTION_STACKTRACE

      public static final String DLT_KEY_EXCEPTION_STACKTRACE
      Exception stack trace for a record published to a dead-letter topic with a key deserialization exception.
      Since:
      2.7
      See Also:
    • DLT_KEY_EXCEPTION_MESSAGE

      public static final String DLT_KEY_EXCEPTION_MESSAGE
      Exception message for a record published to a dead-letter topic with a key deserialization exception.
      Since:
      2.7
      See Also:
    • DLT_KEY_EXCEPTION_FQCN

      public static final String DLT_KEY_EXCEPTION_FQCN
      Exception class name for a record published sent to a dead-letter topic with a key deserialization exception.
      Since:
      2.7
      See Also:
    • DLT_ORIGINAL_TOPIC

      public static final String DLT_ORIGINAL_TOPIC
      Original topic for a record published to a dead-letter topic.
      Since:
      2.2
      See Also:
    • DLT_ORIGINAL_PARTITION

      public static final String DLT_ORIGINAL_PARTITION
      Original partition for a record published to a dead-letter topic.
      Since:
      2.2
      See Also:
    • DLT_ORIGINAL_OFFSET

      public static final String DLT_ORIGINAL_OFFSET
      Original offset for a record published to a dead-letter topic.
      Since:
      2.2
      See Also:
    • DLT_ORIGINAL_CONSUMER_GROUP

      public static final String DLT_ORIGINAL_CONSUMER_GROUP
      Consumer group that failed to consumer a record published to a dead-letter topic.
      Since:
      2.8
      See Also:
    • DLT_ORIGINAL_TIMESTAMP

      public static final String DLT_ORIGINAL_TIMESTAMP
      Original timestamp for a record published to a dead-letter topic.
      Since:
      2.2
      See Also:
    • DLT_ORIGINAL_TIMESTAMP_TYPE

      public static final String DLT_ORIGINAL_TIMESTAMP_TYPE
      Original timestamp type for a record published to a dead-letter topic.
      Since:
      2.2
      See Also:
    • GROUP_ID

      public static final String GROUP_ID
      For inbound messages, the container's group.id consumer property.
      Since:
      2.3
      See Also:
    • DELIVERY_ATTEMPT

      public static final String DELIVERY_ATTEMPT
      For inbound messages, when container retries are enabled the delivery attempt.
      Since:
      2.5
      See Also:
    • EXCEPTION_FQCN

      public static final String EXCEPTION_FQCN
      Exception class name for a record published sent to another topic.
      Since:
      2.2
      See Also:
    • EXCEPTION_CAUSE_FQCN

      public static final String EXCEPTION_CAUSE_FQCN
      Exception class name for a record published sent to another topic.
      Since:
      2.8
      See Also:
    • EXCEPTION_STACKTRACE

      public static final String EXCEPTION_STACKTRACE
      Exception stack trace for a record published to another topic.
      Since:
      2.2
      See Also:
    • EXCEPTION_MESSAGE

      public static final String EXCEPTION_MESSAGE
      Exception message for a record published to another topic.
      Since:
      2.2
      See Also:
    • KEY_EXCEPTION_STACKTRACE

      public static final String KEY_EXCEPTION_STACKTRACE
      Exception stack trace for a record published to another topic with a key deserialization exception.
      Since:
      2.7
      See Also:
    • KEY_EXCEPTION_MESSAGE

      public static final String KEY_EXCEPTION_MESSAGE
      Exception message for a record published to another topic with a key deserialization exception.
      Since:
      2.7
      See Also:
    • KEY_EXCEPTION_FQCN

      public static final String KEY_EXCEPTION_FQCN
      Exception class name for a record published sent to another topic with a key deserialization exception.
      Since:
      2.7
      See Also:
    • ORIGINAL_TOPIC

      public static final String ORIGINAL_TOPIC
      Original topic for a record published to another topic.
      Since:
      2.2
      See Also:
    • ORIGINAL_PARTITION

      public static final String ORIGINAL_PARTITION
      Original partition for a record published to another topic.
      Since:
      2.2
      See Also:
    • ORIGINAL_OFFSET

      public static final String ORIGINAL_OFFSET
      Original offset for a record published to another topic.
      Since:
      2.2
      See Also:
    • ORIGINAL_CONSUMER_GROUP

      public static final String ORIGINAL_CONSUMER_GROUP
      Consumer group that failed to consumer a record published to another topic.
      Since:
      2.8
      See Also:
    • ORIGINAL_TIMESTAMP

      public static final String ORIGINAL_TIMESTAMP
      Original timestamp for a record published to another topic.
      Since:
      2.2
      See Also:
    • ORIGINAL_TIMESTAMP_TYPE

      public static final String ORIGINAL_TIMESTAMP_TYPE
      Original timestamp type for a record published to another topic.
      Since:
      2.2
      See Also:
    • CONVERSION_FAILURES

      public static final String CONVERSION_FAILURES
      The header containing a list of conversion failures (for batch listeners only). Type: List<ConversionException>.
      Since:
      2.8
      See Also:
    • LISTENER_INFO

      public static final String LISTENER_INFO
      Arbitrary static information about the listener receiving this record.
      Since:
      2.8.4
      See Also:
  • Constructor Details

    • KafkaHeaders

      public KafkaHeaders()