Kafka gateway: keep repeated header names and header order
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start with gateways/kafka/docs/BRIDGE_MAPPING.md to see how headers are currently mapped and sorted on Fetch. The issue says kafka_protocol keeps only the last value of a repeated header name, so the raw record bytes need to be read for headers. The open question on whether every record or only repeated-name records keep order must be settled before changing the envelope. Done means the KafkaJS array-header producer succeeds and a record with a repeated header name matches after Produce and Fetch.
Written by the indexing model from the issue text.
Description
Summary
A record with a repeated header name gets INVALID_RECORD (87), and Fetch returns headers sorted by name (gateways/kafka/docs/BRIDGE_MAPPING.md). Kafka allows both.
Who hits it:
- KafkaJS writes array header values as repeated keys, a documented feature. If it forwards a consumed message, it writes them again. The KafkaJS layer of confluent-kafka-javascript does the same.
- Apps that append a trace header twice (https://github.com/spring-projects/spring-kafka/issues/3786).
- Error 87 fails the whole partition batch in librdkafka, franz-go and Sarama. It puts a kafka-python 3.0 producer in a fatal state, so every later send fails until a restart. A kafka-go writer at its default
acks=0loses the batch and the connection, with no error.
Open question
Does every record keep its header order, at the cost of a larger stored envelope, or only records with repeated names?
Scope
- Read headers from the raw record bytes, because
kafka_protocolkeeps only the last value of a name - Store a record with repeated names in the envelope, which keeps a list
- Return headers in their original order on Fetch, as the open question decides
- Update
gateways/kafka/docs/BRIDGE_MAPPING.md
Acceptance criteria
- A KafkaJS producer with array header values succeeds, and a consumer reads every value in order
- A record with the same header name twice is the same after Produce and Fetch
References
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 548
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 194
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/iggy
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 2 days
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
good first issue java test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
good first issue javascript test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
Similar issues
-
marketing
Difficulty 2/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
S: Untriaged T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
libnyanpasu/clash-nyanpasu#6537 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Under an hour Newbie friendliness 62/100
tauri-apps/tao#1445 ·
Maintainers usually reply within 1 day
-
bug P3
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
nearai/compose-manager#95 ·
Maintainers usually reply within 1 day