Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit api versions and metadata v13 #184

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

justinrlee
Copy link

Two changes:

  • Add support for metadataResponse v13 (coming in AK 4.0)
  • Intercept ApiVersions responses, and if we see an API key max version not currently supported by Kafka Proxy, rewrite it to the max version supported by Kafka Proxy

Example scenario:

  • Client supports Metadata (3) Request/Response v14
  • Broker supports Metadata (3) Request/Response v14
  • Kafka Proxy only knows how to parse and rewrite Metadata (3) Response v14

Prior to change, this is the workflow (through KP)

  • Client submits ApiVersions Request to Broker (passed through KP)
  • Broker responds with ApiVersions Response to Client, including Metadata(3) v14 (passed through KP)
  • Client sees that both client and server support Metadata(3) v14, and sends Metadata(3) Request v14 (passed through KP)
  • Server responds with Metadata(3) Response v14 (intercepted by KP, and dropped on the floor because KP doesn't know how to parse it)

Post this change, this is the workflow (through KP):

  • Client submits ApiVersions Request to Broker (passed through KP)
  • Broker responds with ApiVersions Response to Client, including Metadata(3) v14
    • KP intercepts ApiVersions Response, sees Metadata(3) v14 in the list of supported API Versions, and rewrites it to Metadata(3) v13 before sending it back to KP
  • Client sees that broker 'only' supports Metadata(3) v13, and sends Metadata(3) Request v13 (passed through KP)
  • Server responds with Metadata(3) Response v13 (which KP rewrites with new advertised listeners)

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.

1 participant