Class KafkaHeaders
java.lang.Object
one.tomorrow.transactionaloutbox.commons.KafkaHeaders
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final StringThe name for the header to store the sequence as long.static final StringThe name for the header to store service that published the event.static final StringThe header to store the type of the value, so data can be deserialized to that type. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
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
The name for the header to store the sequence as long. Because header values are stored asbyte[], the value is expected to be the big-endian representation of the long in an 8-element byte array.
To transform a long tobyte[], you can useLongs.toByteArray(long).
Note:BigInteger.toByteArray()does not return the appropriate representation!- See Also:
-
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
- See Also:
-
HEADERS_DLT_RETRY_NAME
- See Also:
-
-
Constructor Details
-
KafkaHeaders
public KafkaHeaders()
-
-
Method Details
-
knownHeaders
-