provectus / kafka-ui

Open-Source Web UI for Apache Kafka Management
Apache License 2.0
9.88k stars 1.2k forks source link

Record headers not passed to custom serde when deserializing key #4492

Open twinprime opened 1 month ago

twinprime commented 1 month ago

Issue submitter TODO list

Describe the bug (actual behavior)

When ConsumerRecordDeserializer invoke Serde.Deserializer.deserialize, it pass in an empty list of RecordHeader instead of the actual RecordHeaders

var deserResult = keyDeserializer.deserialize(new RecordHeadersImpl(), rec.key().get())

My custom Serde require the record headers to find the encoding schema from our schema registry.

Expected behavior

ConsumerRecordDeserializer should pass the record headers to the deserialize function like what it does when deserializing values.

var deserResult = keyDeserializer.deserialize(new RecordHeadersImpl(rec.headers()), rec.key().get())

Your installation details

I reference the master branch code above: https://github.com/provectus/kafka-ui/blob/83b5a60cc08501b570a0c4d0b4cdfceb1b88d6b7/kafka-ui-api/src/main/java/com/provectus/kafka/ui/serdes/ConsumerRecordDeserializer.java#L81

Steps to reproduce

Problem should be obvious from the actual source code quoted above.

Screenshots

No response

Logs

No response

Additional context

My custom Serde cannot deserialize record key without information in the record headers.

github-actions[bot] commented 1 month ago

Hello there twinprime! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀

Haarolean commented 1 month ago

Hi, this repo is not maintained (#4255). Please raise one here: https://github.com/kafbat/kafka-ui