[#8] Duplicate logic for parsing of Kafka headers
See original GitHub issueI found that the classes RecordUtil
and KafkaMessageHelper
implement the same use case: getting and decoding Kafka headers. It would be good to have this implemented only once.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Top 5 Things Every Apache Kafka Developer Should Know
Record headers give you the ability to add some metadata about the Kafka record, without adding any extra information to the key/value pair...
Read more >Documentation - Apache Kafka
It is an extensible tool that runs connectors, which implement the custom logic for interacting with an external system. In this quickstart we'll...
Read more >Adding Custom Headers in Kafka Message - Stack Overflow
Kafka v0.11.0.0 adds support for custom headers. You can add them when creating a ProducerRecord like this: new ProducerRecord(key, value, headers, .
Read more >Duplicate headers · Issue #2335 · spring-projects/spring-kafka
The DLT_ headers are for "classic" (blocking) retries with the default DeadLetterPublishingRecoverer . The ones without the DLT_ are for non- ...
Read more >org.apache.kafka.common.header.Headers Java Examples
This page shows Java code examples of org.apache.kafka.common.header. ... headers = getHeaders(); Headers copy = new RecordHeaders(headers); copy.add(new ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, taking the first header and not causing an error is still not my preference, but at least there’s some consistency to it. So, ok. Interestingly, the Kafka
Headers
interface only has alastHeader
method for getting a single header.@b-abel @calohmn We already deal with handling of multiple headers having the same key in Hono. In case of HTTP headers, we take the first header value. We could apply the same here in case of kafka headers too and keep it uniform. IMHO what is important, is to clearly document the behavior in the specifications.
EDIT: In case of MQTT property bag, if there are more than one values for the specified name, then the first value is used.