Skip to content

feat(inkless): resolve client AZ from listener map in metadata transformer#684

Merged
giuseppelillo merged 1 commit into
mainfrom
gqmelo/producer-rack-metadata
Jul 7, 2026
Merged

feat(inkless): resolve client AZ from listener map in metadata transformer#684
giuseppelillo merged 1 commit into
mainfrom
gqmelo/producer-rack-metadata

Conversation

@gqmelo

@gqmelo gqmelo commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Note

This was created on top #683 so the base branch isn't main yet. It will be updated once the other PR is merged.

This adds support for producers to be rack-aware without having to change their client IDs.

We are still keeping compatibility with client.id=my-app,diskless_az=<AZ> and it takes precedence over the
listener option.

For the listener option, all brokers will keep a config mapping LISTENER_NAME=AZ, then clients connect to the exact listener based on the AZ they want.
When handling the metadata request, the listener used for the request is mapped back to the AZ associated to that listener and a leader in that AZ is returned.

KC-258

@gqmelo
gqmelo requested a review from Copilot July 6, 2026 08:50
@gqmelo
gqmelo changed the base branch from main to gqmelo/producer-rack-add-listener-map-config July 6, 2026 08:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds listener-based client AZ resolution for diskless-topic metadata routing, allowing clients without a diskless_az=<az> marker in client.id to still receive AZ-aware leader selection based on the request listener.

Changes:

  • Extend InklessTopicMetadataTransformer to resolve client AZ via client.id marker first, then via a new listener→AZ mapping, else fall back to non-AZ-aware routing.
  • Add and validate new broker config inkless.client.az.listener.map (comma-separated LISTENER=az pairs) and expose it via InklessConfig.clientAzListenerMap().
  • Add unit + integration tests for parsing and listener-based inference, and document the new config.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Show a summary per file
File Description
storage/inkless/src/main/java/io/aiven/inkless/metadata/InklessTopicMetadataTransformer.java Adds listener-based AZ inference with explicit client.id marker taking precedence.
storage/inkless/src/main/java/io/aiven/inkless/config/InklessConfig.java Introduces client.az.listener.map config, parsing/validation, and an accessor for the normalized map.
core/src/main/scala/kafka/server/KafkaApis.scala Wires the new config map into the metadata transformer construction.
storage/inkless/src/test/java/io/aiven/inkless/metadata/InklessTopicMetadataTransformerTest.java Updates constructor usage and adds coverage for listener-based AZ resolution behavior.
storage/inkless/src/test/java/io/aiven/inkless/config/InklessConfigTest.java Adds tests for parsing, normalization, defaults, and validation failures of the new config.
core/src/test/java/kafka/server/InklessManagedReplicasClusterTest.java Adds integration coverage for listener-inferred AZ without client.id marker.
docs/inkless/configs.rst Documents the new client.az.listener.map configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gqmelo
gqmelo force-pushed the gqmelo/producer-rack-metadata branch from 35dacfc to 74cae99 Compare July 6, 2026 09:52
@gqmelo gqmelo changed the title Gqmelo/producer rack metadata feat(inkless): resolve client AZ from listener map in metadata transformer Jul 6, 2026
@gqmelo
gqmelo force-pushed the gqmelo/producer-rack-metadata branch from 74cae99 to 191d880 Compare July 6, 2026 11:27
@gqmelo
gqmelo requested a review from giuseppelillo July 6, 2026 12:23
Base automatically changed from gqmelo/producer-rack-add-listener-map-config to main July 7, 2026 13:29
…ormer

This adds support for producers to be rack-aware without having
to change their client IDs.

We are still keeping compatibility with
`client.id=my-app,diskless_az=<AZ>` and it takes precedence over the
listener option.

For the listener option, all brokers will keep a config mapping
LISTENER_NAME=AZ, then clients connect to the exact listener based
on the AZ they want.
When handling the metadata request, the listener used for the request
is mapped back to the AZ associated to that listener and a leader in
that AZ is returned.

[KC-258]
@gqmelo
gqmelo force-pushed the gqmelo/producer-rack-metadata branch from 191d880 to 61fccd7 Compare July 7, 2026 13:45
@gqmelo
gqmelo marked this pull request as ready for review July 7, 2026 13:45
@giuseppelillo
giuseppelillo merged commit f771cf6 into main Jul 7, 2026
7 checks passed
@giuseppelillo
giuseppelillo deleted the gqmelo/producer-rack-metadata branch July 7, 2026 14:21
jeqo pushed a commit that referenced this pull request Jul 8, 2026
…ormer (#684)

This adds support for producers to be rack-aware without having
to change their client IDs.

We are still keeping compatibility with
`client.id=my-app,diskless_az=<AZ>` and it takes precedence over the
listener option.

For the listener option, all brokers will keep a config mapping
LISTENER_NAME=AZ, then clients connect to the exact listener based
on the AZ they want.
When handling the metadata request, the listener used for the request
is mapped back to the AZ associated to that listener and a leader in
that AZ is returned.

[KC-258]
jeqo pushed a commit that referenced this pull request Jul 8, 2026
…ormer (#684)

This adds support for producers to be rack-aware without having
to change their client IDs.

We are still keeping compatibility with
`client.id=my-app,diskless_az=<AZ>` and it takes precedence over the
listener option.

For the listener option, all brokers will keep a config mapping
LISTENER_NAME=AZ, then clients connect to the exact listener based
on the AZ they want.
When handling the metadata request, the listener used for the request
is mapped back to the AZ associated to that listener and a leader in
that AZ is returned.

[KC-258]
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.

3 participants