Class KafkaHeaders


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

      Fields 
      Modifier and Type Field Description
      static java.lang.String ACKNOWLEDGMENT
      The header for the Acknowledgment.
      static java.lang.String BATCH_CONVERTED_HEADERS
      The header for a list of Maps of converted native Kafka headers.
      static java.lang.String CONSUMER
      The header for the Consumer object.
      static java.lang.String CORRELATION_ID
      The header containing information to correlate requests/replies.
      static java.lang.String DELIVERY_ATTEMPT
      For inbound messages, when container retries are enabled the delivery attempt.
      static java.lang.String DLT_EXCEPTION_FQCN
      Exception class name for a record published sent to a dead-letter topic.
      static java.lang.String DLT_EXCEPTION_MESSAGE
      Exception message for a record published to a dead-letter topic.
      static java.lang.String DLT_EXCEPTION_STACKTRACE
      Exception stack trace for a record published to a dead-letter topic.
      static java.lang.String DLT_ORIGINAL_OFFSET
      Original offset for a record published to a dead-letter topic.
      static java.lang.String DLT_ORIGINAL_PARTITION
      Original partition for a record published to a dead-letter topic.
      static java.lang.String DLT_ORIGINAL_TIMESTAMP
      Original timestamp for a record published to a dead-letter topic.
      static java.lang.String DLT_ORIGINAL_TIMESTAMP_TYPE
      Original timestamp type for a record published to a dead-letter topic.
      static java.lang.String DLT_ORIGINAL_TOPIC
      Original topic for a record published to a dead-letter topic.
      static java.lang.String GROUP_ID
      For inbound messages, the container's group.id consumer property.
      static java.lang.String MESSAGE_KEY
      The header containing the message key when sending data to Kafka.
      static java.lang.String NATIVE_HEADERS
      The header for holding the native headers of the consumer record; only provided if no header mapper is present.
      static java.lang.String OFFSET
      The header for the partition offset.
      static java.lang.String PARTITION_ID
      The header containing the topic partition when sending data to Kafka.
      static java.lang.String PREFIX
      The prefix for Kafka headers.
      static java.lang.String RAW_DATA
      The header containing the raw data received from Kafka (ConsumerRecord or ConsumerRecords).
      static java.lang.String RECEIVED
      The prefix for Kafka headers containing 'received' values.
      static java.lang.String RECEIVED_MESSAGE_KEY
      The header containing the message key for the received message.
      static java.lang.String RECEIVED_PARTITION_ID
      The header containing the topic partition for the received message.
      static java.lang.String RECEIVED_TIMESTAMP
      The header for holding the timestamp of the consumer record.
      static java.lang.String RECEIVED_TOPIC
      The header containing the topic from which the message was received.
      static java.lang.String RECORD_METADATA
      The header containing the RecordMetadata object after successful send to the topic.
      static java.lang.String REPLY_PARTITION
      The header containing a partition number on which to send the reply.
      static java.lang.String REPLY_TOPIC
      The header containing the default reply topic.
      static java.lang.String TIMESTAMP
      The header for holding the timestamp of the producer record.
      static java.lang.String TIMESTAMP_TYPE
      The header for holding the type of timestamp.
      static java.lang.String TOPIC
      The header containing the topic when sending data to Kafka.
    • Constructor Summary

      Constructors 
      Constructor Description
      KafkaHeaders()  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PREFIX

        public static final java.lang.String PREFIX
        The prefix for Kafka headers.
        See Also:
        Constant Field Values
      • RECEIVED

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

        public static final java.lang.String TOPIC
        The header containing the topic when sending data to Kafka.
        See Also:
        Constant Field Values
      • MESSAGE_KEY

        public static final java.lang.String MESSAGE_KEY
        The header containing the message key when sending data to Kafka.
        See Also:
        Constant Field Values
      • PARTITION_ID

        public static final java.lang.String PARTITION_ID
        The header containing the topic partition when sending data to Kafka.
        See Also:
        Constant Field Values
      • OFFSET

        public static final java.lang.String OFFSET
        The header for the partition offset.
        See Also:
        Constant Field Values
      • RAW_DATA

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

        public static final java.lang.String RECORD_METADATA
        The header containing the RecordMetadata object after successful send to the topic.
        See Also:
        Constant Field Values
      • CONSUMER

        public static final java.lang.String CONSUMER
        The header for the Consumer object.
        See Also:
        Constant Field Values
      • RECEIVED_TOPIC

        public static final java.lang.String RECEIVED_TOPIC
        The header containing the topic from which the message was received.
        See Also:
        Constant Field Values
      • RECEIVED_MESSAGE_KEY

        public static final java.lang.String RECEIVED_MESSAGE_KEY
        The header containing the message key for the received message.
        See Also:
        Constant Field Values
      • RECEIVED_PARTITION_ID

        public static final java.lang.String RECEIVED_PARTITION_ID
        The header containing the topic partition for the received message.
        See Also:
        Constant Field Values
      • TIMESTAMP_TYPE

        public static final java.lang.String TIMESTAMP_TYPE
        The header for holding the type of timestamp.
        See Also:
        Constant Field Values
      • TIMESTAMP

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

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

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

        public static final java.lang.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:
        Constant Field Values
      • CORRELATION_ID

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

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

        public static final java.lang.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:
        Constant Field Values
      • DLT_EXCEPTION_FQCN

        public static final java.lang.String DLT_EXCEPTION_FQCN
        Exception class name for a record published sent to a dead-letter topic.
        Since:
        2.2
        See Also:
        Constant Field Values
      • DLT_EXCEPTION_STACKTRACE

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

        public static final java.lang.String DLT_EXCEPTION_MESSAGE
        Exception message for a record published to a dead-letter topic.
        Since:
        2.2
        See Also:
        Constant Field Values
      • DLT_ORIGINAL_TOPIC

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

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

        public static final java.lang.String DLT_ORIGINAL_OFFSET
        Original offset for a record published to a dead-letter topic.
        Since:
        2.2
        See Also:
        Constant Field Values
      • DLT_ORIGINAL_TIMESTAMP

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

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

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

        public static final java.lang.String DELIVERY_ATTEMPT
        For inbound messages, when container retries are enabled the delivery attempt.
        Since:
        2.5
        See Also:
        Constant Field Values
    • Constructor Detail

      • KafkaHeaders

        public KafkaHeaders()