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 CONVERSION_FAILURES
      The header containing a list of conversion failures (for batch listeners only).
      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_CAUSE_FQCN
      Exception cause class name for a record published sent to a dead-letter topic.
      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_KEY_EXCEPTION_FQCN
      Exception class name for a record published sent to a dead-letter topic with a key deserialization exception.
      static java.lang.String DLT_KEY_EXCEPTION_MESSAGE
      Exception message for a record published to a dead-letter topic with a key deserialization exception.
      static java.lang.String DLT_KEY_EXCEPTION_STACKTRACE
      Exception stack trace for a record published to a dead-letter topic with a key deserialization exception.
      static java.lang.String DLT_ORIGINAL_CONSUMER_GROUP
      Consumer group that failed to consumer 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 EXCEPTION_CAUSE_FQCN
      Exception class name for a record published sent to another topic.
      static java.lang.String EXCEPTION_FQCN
      Exception class name for a record published sent to another topic.
      static java.lang.String EXCEPTION_MESSAGE
      Exception message for a record published to another topic.
      static java.lang.String EXCEPTION_STACKTRACE
      Exception stack trace for a record published to another topic.
      static java.lang.String GROUP_ID
      For inbound messages, the container's group.id consumer property.
      static java.lang.String KEY
      The header containing the record key when sending data to Kafka.
      static java.lang.String KEY_EXCEPTION_FQCN
      Exception class name for a record published sent to another topic with a key deserialization exception.
      static java.lang.String KEY_EXCEPTION_MESSAGE
      Exception message for a record published to another topic with a key deserialization exception.
      static java.lang.String KEY_EXCEPTION_STACKTRACE
      Exception stack trace for a record published to another topic with a key deserialization exception.
      static java.lang.String LISTENER_INFO
      Arbitrary static information about the listener receiving this record.
      static java.lang.String MESSAGE_KEY
      Deprecated.
      in favor of KEY.
      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 ORIGINAL_CONSUMER_GROUP
      Consumer group that failed to consumer a record published to another topic.
      static java.lang.String ORIGINAL_OFFSET
      Original offset for a record published to another topic.
      static java.lang.String ORIGINAL_PARTITION
      Original partition for a record published to another topic.
      static java.lang.String ORIGINAL_TIMESTAMP
      Original timestamp for a record published to another topic.
      static java.lang.String ORIGINAL_TIMESTAMP_TYPE
      Original timestamp type for a record published to another topic.
      static java.lang.String ORIGINAL_TOPIC
      Original topic for a record published to another topic.
      static java.lang.String PARTITION
      The header containing the topic partition when sending data to Kafka.
      static java.lang.String PARTITION_ID
      Deprecated.
      in favor of PARTITION.
      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_KEY
      The header containing the record key from the received message.
      static java.lang.String RECEIVED_MESSAGE_KEY
      Deprecated.
      in favor of RECEIVED_KEY.
      static java.lang.String RECEIVED_PARTITION
      The header containing the topic partition from the received message.
      static java.lang.String RECEIVED_PARTITION_ID
      Deprecated.
      in favor of RECEIVED_PARTITION.
      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
      • KEY

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

        @Deprecated
        public static final java.lang.String MESSAGE_KEY
        Deprecated.
        in favor of KEY.
        The header containing the message key when sending data to Kafka.
        See Also:
        Constant Field Values
      • PARTITION

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

        @Deprecated
        public static final java.lang.String PARTITION_ID
        Deprecated.
        in favor of PARTITION.
        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_KEY

        public static final java.lang.String RECEIVED_KEY
        The header containing the record key from the received message.
        Since:
        2.9
        See Also:
        Constant Field Values
      • RECEIVED_MESSAGE_KEY

        @Deprecated
        public static final java.lang.String RECEIVED_MESSAGE_KEY
        Deprecated.
        in favor of RECEIVED_KEY.
        The header containing the record key from the received message.
        See Also:
        Constant Field Values
      • RECEIVED_PARTITION

        public static final java.lang.String RECEIVED_PARTITION
        The header containing the topic partition from the received message.
        Since:
        2.9
        See Also:
        Constant Field Values
      • RECEIVED_PARTITION_ID

        @Deprecated
        public static final java.lang.String RECEIVED_PARTITION_ID
        Deprecated.
        in favor of RECEIVED_PARTITION.
        The header containing the topic partition from 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_CAUSE_FQCN

        public static final java.lang.String DLT_EXCEPTION_CAUSE_FQCN
        Exception cause class name for a record published sent to a dead-letter topic.
        Since:
        2.8
        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_KEY_EXCEPTION_STACKTRACE

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

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

        public static final java.lang.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:
        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_CONSUMER_GROUP

        public static final java.lang.String DLT_ORIGINAL_CONSUMER_GROUP
        Consumer group that failed to consumer a record published to a dead-letter topic.
        Since:
        2.8
        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
      • EXCEPTION_FQCN

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static final java.lang.String LISTENER_INFO
        Arbitrary static information about the listener receiving this record.
        Since:
        2.8.4
        See Also:
        Constant Field Values
    • Constructor Detail

      • KafkaHeaders

        public KafkaHeaders()