Class KafkaHeaders

java.lang.Object
one.tomorrow.transactionaloutbox.commons.KafkaHeaders

public class KafkaHeaders extends Object
  • Field Details

    • HEADERS_SOURCE_NAME

      public static final String HEADERS_SOURCE_NAME
      The name for the header to store service that published the event. Useful in a migration scenario (an event is going to be published by a different service).
      See Also:
    • HEADERS_SEQUENCE_NAME

      public static final String HEADERS_SEQUENCE_NAME
      The name for the header to store the sequence as long. Because header values are stored as byte[], the value is expected to be the big-endian representation of the long in an 8-element byte array.
      To transform a long to byte[], you can use Longs.toByteArray(long).
      Note: BigInteger.toByteArray() does not return the appropriate representation!
      See Also:
    • HEADERS_VALUE_TYPE_NAME

      public static final String HEADERS_VALUE_TYPE_NAME
      The header to store the type of the value, so data can be deserialized to that type.
      See Also:
    • HEADERS_DLT_SOURCE_NAME

      public static final String HEADERS_DLT_SOURCE_NAME
      See Also:
    • HEADERS_DLT_RETRY_NAME

      public static final String HEADERS_DLT_RETRY_NAME
      See Also:
  • Constructor Details

    • KafkaHeaders

      public KafkaHeaders()
  • Method Details

    • knownHeaders

      public static Map<String,Object> knownHeaders(org.apache.kafka.common.header.Headers headers)