#Spring Kafka Listener not including all Headers

1 messages · Page 1 of 1 (latest)

native charm
#

Hello,

I've been looking for a solution for this for some time now, but haven't found much. Long story short: We want to log how long a message remains in a kafka topic before it is handled. For this we want to use the built in Kafka Headers that Spring boot offers.

Basically like this:

@Header(KafkaHeaders.TIMESTAMP) long insertedTimestamp,
        @Header(KafkaHeaders.RECEIVED_TIMESTAMP) long receivedTimestamp)

Now the issue is that TIMESTAMP itself is never around. Even when using @Headers Map<.... to get all available ones, only listener side values are available. Sadly my search hasn't yelded much information, regarding how to turn it on/off or if it needs to be set manually. Any help is appreciated, thanks!

twin rivetBOT
#

<@&1004656351647117403> please have a look, thanks.