Skip to content

KAFKA-20620: Add StreamsGroupTopologyDescriptionUpdate RPC schema and extend StreamsGroupDescribe/Heartbeat#22397

Draft
aliehsaeedii wants to merge 4 commits into
apache:trunkfrom
aliehsaeedii:KAFKA-20620
Draft

KAFKA-20620: Add StreamsGroupTopologyDescriptionUpdate RPC schema and extend StreamsGroupDescribe/Heartbeat#22397
aliehsaeedii wants to merge 4 commits into
apache:trunkfrom
aliehsaeedii:KAFKA-20620

Conversation

@aliehsaeedii
Copy link
Copy Markdown
Contributor

First sub-task of KIP-1331 (Streams Group Topology Description Plugin). Adds the wire-format scaffolding only — no broker handler or client logic yet (those land in later tickets).

  • New RPC StreamsGroupTopologyDescriptionUpdate (apiKey 93) — request/response schemas + Java wrappers, wired through ApiKeys, AbstractRequest, AbstractResponse,
    RequestConvertToJson.
  • New error codes: GROUP_DELETION_FAILED (134), STREAMS_TOPOLOGY_DESCRIPTION_UPDATE_FAILED (135), with matching exception classes.
  • StreamsGroupHeartbeatResponse: tagged TopologyDescriptionRequired.
  • StreamsGroupDescribeRequest: tagged IncludeTopologyDescription.
  • StreamsGroupDescribeResponse: tagged TopologyDescription + TopologyDescriptionStatus.
  • DeleteGroups{Request,Response} bumped to v3 with per-group ErrorMessage.

aliehsaeedii and others added 2 commits May 28, 2026 10:47
Align nested struct names in StreamsGroupTopologyDescriptionUpdateRequest
with StreamsGroupDescribeResponse (TopologyDescriptionSubtopology /
TopologyDescriptionNode / TopologyDescriptionGlobalStore) so the broker
can pass the same generated type through both RPCs without a converter.
Keeping the prefixed form rather than the simple Subtopology name avoids
colliding with the existing v0 inline Subtopology struct used by the
already-shipped Topology field.

Also populate ErrorMessage in getErrorResponse so the response field
defined by the schema is set on error, and exercise the nested topology
struct in the RequestResponseTest round-trip with a realistic
source/processor/sink subtopology plus a global store.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aliehsaeedii aliehsaeedii marked this pull request as draft May 28, 2026 10:14
@github-actions github-actions Bot added triage PRs from the community core Kafka Broker clients labels May 28, 2026
{ "name": "IncludeAuthorizedOperations", "type": "bool", "versions": "0+",
"about": "Whether to include authorized operations." }
"about": "Whether to include authorized operations." },
{ "name": "IncludeTopologyDescription", "type": "bool", "versions": "0+",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The KIP states that we use a request version bump instead of a tagged field

@github-actions github-actions Bot removed the triage PRs from the community label May 29, 2026
- Bump StreamsGroupHeartbeat request and response to v1 so the new
  TopologyDescriptionRequired field is actually negotiated.
- Mark StreamsGroupTopologyDescriptionUpdate as latestVersionUnstable
  until the broker handler lands; exclude from RequestQuotaTest via a
  new UnimplementedApis set.
- Fix StreamsGroupDescribeRequest.getErrorResponse to set
  TopologyDescriptionStatus=ERROR when the client requested topology;
  previously defaulted to NOT_REQUESTED, contradicting KIP-1331.
- Switch the Update RPC getErrorResponse to ApiError.fromThrowable so
  cause messages survive while UNKNOWN_SERVER_ERROR is sanitized.
- Reword "plugin" out of client-visible strings (Errors.java default
  message, JSON about fields).
- Add lifecycle Javadoc to the new Request class (drops duplicated
  error code list) and error-code Javadoc to the new Response class;
  document the TopologyDescription/Status biconditional invariant and
  the errorCounts() vs Status=ERROR caveat on DescribeResponse.
- Add "Supported errors" comment block to the new UpdateResponse JSON.
- Strengthen tests: nullable SinkTopic round-trip, TopologyDescription
  null/NOT_STORED coverage, explicit assertion on DeleteGroups v3
  per-group ErrorMessage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients core Kafka Broker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants