contrib/kafka: Bumping the Kafka protocol to 4.x drops client protocol support below 2.1

Aperta
#49,554 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, kafka
Ambito
networking

Direzione di ricerca

Start from the kafka bazel_dep pin and the codec generator that feeds the kafka_broker/kafka_mesh contrib filters, then read the per-version round-trip tests that assert which request versions can be parsed. Diff the 3.9.2 spec ranges against the 4.4.0 ones from #49545 to list exactly which versions (Produce v0-2, Fetch v0-3, ListOffsets v0, the controller APIs) disappear. Done means a recorded decision — accept the 2.1 baseline or make the generator emit the union of both ranges — with the test matrix updated to match.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/kafka

Summary

Envoy's kafka_broker / kafka_mesh contrib filters generate their request/response codec from a pinned Apache Kafka protocol module (kafka bazel_dep, currently 3.9.2.envoy). To support clients shipped with Confluent Platform 8.x / cp-kafka 8.x (Apache Kafka 4.x), the module needs to be bumped to a 4.x release (see #49545, which bumps it to 4.4.0 and fixes the generator to consume the 4.x message specs).

Kafka 4.0 (KIP-896) removed the client protocol API versions older than the 2.1 baseline. As a direct consequence, generating the codec from 4.x specs drops the ability to parse those old versions that the 3.9.2 codec can parse today:

  • Produce v0–2, Fetch v0–3, ListOffsets v0 (the pre-2.1 request versions)
  • The ZooKeeper-era controller APIs (LeaderAndIsr / StopReplica / UpdateMetadata / ControlledShutdown) — inter-broker only, not client traffic

The tradeoff / decision needed

This is a behavioural change for the filters and should be decided independently of the mechanics in #49545:

  • A client pinned to one of the removed protocol versions, which works through the filter today, would stop working after the bump.
  • This matches real Kafka 4.0 — a pre-2.1 client cannot talk to a 4.0 broker at all — so for deployments fronting a 4.x broker there is no additional loss.
  • The only genuine regression is: the filter in front of a 3.x broker (which still accepts pre-2.1 clients) with a pre-2.1 client. Today the filter proxies it; after the bump it cannot parse those frames.

Options

  1. Accept the Kafka 2.1 baseline — generate from 4.x specs as-is, matching upstream Kafka. Simplest; loses the narrow 3.x-broker + pre-2.1-client case.
  2. Preserve pre-2.1 support — generate the codec from the union of the old and new version ranges (keep the dropped low-version parsers while adding the 4.x high ones). Keeps the old case alive at the cost of generator work and carrying removed protocol versions.

Backward compatibility within the 2.1+ range is unaffected either way: the per-version codec round-trip tests cover every version still in the spec, so 3.x clients (which negotiate versions well above 2.1) continue to work.

(bot assisted)

Lingua principale
C++
Stelle
29.3k
Fork
5.7k
Merge medio
2g 14h
PR unite (30g)
408

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di envoyproxy/envoy

Tutte le issue di envoyproxy/envoy

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.