Skip to content

[kafka] Serve ApiVersions from registered capabilities - #4260

Draft
gyang94 wants to merge 2 commits into
apache:mainfrom
gyang94:codex/kafka-api-versions
Draft

[kafka] Serve ApiVersions from registered capabilities#4260
gyang94 wants to merge 2 commits into
apache:mainfrom
gyang94:codex/kafka-api-versions

Conversation

@gyang94

@gyang94 gyang94 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Purpose

Closes #4265.

Part of umbrella #4185; this PR does not close the umbrella.

Stage 2 of the foundation work under #4185, tracked by #4265. Implement ApiVersions negotiation using the capabilities actually registered on the server. Depends on #4264 and its implementation PR #4259.

Brief change log

  • Add ApiVersionsHandler and build its advertised versions from the capability registry.
  • Replace the old request-handler switch/stubs with the new asynchronous dispatcher.
  • Advertise only ApiVersions in this stage; Metadata is registered by the next PR.
  • Cover supported/unsupported versions, invalid requests, error responses, and advertised capabilities.

Incremental scope: 4 files, +207 / -243 lines (450 changed lines including tests).

Tests

  • mvn -o -pl fluss-kafka verify: 23 unit tests and 1 integration test.
  • Spotless, Checkstyle, and git diff --check.
  • git range-diff confirms unchanged patches after rebasing the stack onto main (b9a1653fa).

Dependencies were rebuilt with mvn -o -pl fluss-kafka -am install -DskipTests on Java 11. This also passed the reactor's Checkstyle, Spotless and RAT checks. The entire repository test suite was not run.

API and Format

Changes Kafka ApiVersions responses to reflect registered capabilities. No Fluss public API or storage-format change. Produce, Metadata, and topic administration are not implemented in this stage.

Documentation

The supported-capability boundary is documented in this PR and handler Javadoc.

Stack and review

  1. [kafka] Add request dispatch and transport framework #4259 — request/transport framework.
  2. This PR — ApiVersions.
  3. Metadata — [kafka] Implement Metadata API over Fluss table metadata #4261.

This PR is a draft until its prerequisite lands. Since its target is Apache main, GitHub's Files changed view currently includes the prerequisite. For this stage alone, review the incremental comparison. Rebase onto the updated main after the prerequisite is merged and before marking ready.

Generative AI disclosure: Codex assisted with implementation, testing, and commit organization. Human review is required before merge.

gyang94 and others added 2 commits September 9, 2026 14:04
Introduce API registration, request context, version validation, and
asynchronous error mapping. Fix request buffer ownership and response
serialization cleanup while preserving the existing ApiVersions entry point.

Validated with mvn -o -pl fluss-rpc,fluss-kafka verify.

Co-Authored-By: Codex <noreply@openai.com>
AI-Model: gpt-6
AI-Contributed/Feature: 555/555
AI-Contributed/UT: 525/525
Route requests through the dispatcher and advertise only implemented APIs.
Return version-aware errors for unsupported APIs and invalid requests.

Validated with mvn -o -pl fluss-kafka verify (23 unit tests and 1 IT).

Co-Authored-By: Codex <noreply@openai.com>
AI-Model: gpt-6
AI-Contributed/Feature: 313/313
AI-Contributed/UT: 137/137
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[kafka] Implement registry-backed ApiVersions API

1 participant