You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "aliehsaeedii (via GitHub)" <gi...@apache.org> on 2026/05/28 10:14:31 UTC
[PR] KAFKA-20620: Add StreamsGroupTopologyDescriptionUpdate RPC schema and extend StreamsGroupDescribe/Heartbeat [kafka]
aliehsaeedii opened a new pull request, #22397:
URL: https://github.com/apache/kafka/pull/22397
First sub-task of [KIP-1331](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1331%3A+Streams+Group+Topology+Description+Plugin) (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`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20620: Add StreamsGroupTopologyDescriptionUpdate RPC schema and extend StreamsGroupDescribe/Heartbeat [kafka]
Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru merged PR #22397:
URL: https://github.com/apache/kafka/pull/22397
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20620: Add StreamsGroupTopologyDescriptionUpdate RPC schema and extend StreamsGroupDescribe/Heartbeat [kafka]
Posted by "aliehsaeedii (via GitHub)" <gi...@apache.org>.
aliehsaeedii commented on code in PR #22397:
URL: https://github.com/apache/kafka/pull/22397#discussion_r3344798916
##########
clients/src/main/resources/common/message/StreamsGroupTopologyDescriptionUpdateRequest.json:
##########
@@ -0,0 +1,71 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+ "apiKey": 93,
+ "type": "request",
+ "listeners": ["broker"],
+ "name": "StreamsGroupTopologyDescriptionUpdateRequest",
+ // The broker handler is not yet implemented (deferred to a later sub-task of KIP-1331),
+ // so the latest version is marked unstable to suppress ApiVersions advertisement.
+ "latestVersionUnstable": true,
Review Comment:
Good catch on Heartbeat v1 and Describe v1 — those bumps are dead weight until the topology-description manager lands, and I'll mark them latestVersionUnstable: true and add a follow-up JIRA to flip them stable before release. DeleteGroups v3 I'd prefer to keep stable: ErrorMessage is a general-purpose enhancement that any error path can use, not specific to topology-description.
FYI: marking the two Streams bumps unstable broke Builder.build() defaults in tests when I tried it on the new RPC — I'll need to use explicit-version build(short) calls.
##########
clients/src/main/resources/common/message/StreamsGroupTopologyDescriptionUpdateRequest.json:
##########
@@ -0,0 +1,71 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+ "apiKey": 93,
+ "type": "request",
+ "listeners": ["broker"],
+ "name": "StreamsGroupTopologyDescriptionUpdateRequest",
+ // The broker handler is not yet implemented (deferred to a later sub-task of KIP-1331),
+ // so the latest version is marked unstable to suppress ApiVersions advertisement.
+ "latestVersionUnstable": true,
Review Comment:
https://issues.apache.org/jira/browse/KAFKA-20655
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20620: Add StreamsGroupTopologyDescriptionUpdate RPC schema and extend StreamsGroupDescribe/Heartbeat [kafka]
Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru commented on code in PR #22397:
URL: https://github.com/apache/kafka/pull/22397#discussion_r3342477786
##########
core/src/test/scala/unit/kafka/server/RequestQuotaTest.scala:
##########
@@ -905,6 +905,8 @@ object RequestQuotaTest {
val Envelope = Set(ApiKeys.ENVELOPE)
val ShareGroupState = Set(ApiKeys.INITIALIZE_SHARE_GROUP_STATE, ApiKeys.READ_SHARE_GROUP_STATE, ApiKeys.WRITE_SHARE_GROUP_STATE,
ApiKeys.DELETE_SHARE_GROUP_STATE, ApiKeys.READ_SHARE_GROUP_STATE_SUMMARY)
+ // APIs whose broker handler has not been wired yet; exclude from quota tests until they land.
+ val UnimplementedApis: Set[ApiKeys] = Set(ApiKeys.STREAMS_GROUP_TOPOLOGY_DESCRIPTION_UPDATE)
Review Comment:
That's okay, but a bit awkward. Could we instead add a stub handler in KafkaApis that returns `UNSUPPORTED_VERSION`? Then we should be able to make it work without this workaround.
##########
clients/src/main/resources/common/message/StreamsGroupTopologyDescriptionUpdateRequest.json:
##########
@@ -0,0 +1,71 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+ "apiKey": 93,
+ "type": "request",
+ "listeners": ["broker"],
+ "name": "StreamsGroupTopologyDescriptionUpdateRequest",
+ // The broker handler is not yet implemented (deferred to a later sub-task of KIP-1331),
+ // so the latest version is marked unstable to suppress ApiVersions advertisement.
+ "latestVersionUnstable": true,
+ "validVersions": "0",
+ "flexibleVersions": "0+",
+ "fields": [
+ { "name": "GroupId", "type": "string", "versions": "0+", "entityType": "groupId",
+ "about": "The streams group identifier." },
+ { "name": "MemberId", "type": "string", "versions": "0+",
+ "about": "The ID of the streams group member sending the push. The broker validates that this member is still in the group; mismatches (including when the group itself has been deleted) are rejected with UNKNOWN_MEMBER_ID so the client treats itself as fenced and rejoins." },
+ { "name": "TopologyEpoch", "type": "int32", "versions": "0+",
+ "about": "The epoch of the topology being described." },
+ { "name": "TopologyDescription", "type": "TopologyDescription", "versions": "0+",
+ "about": "The topology description." }
+ ],
+ "commonStructs": [
+ { "name": "TopologyDescription", "versions": "0+", "fields": [
+ { "name": "Subtopologies", "type": "[]TopologyDescriptionSubtopology", "versions": "0+",
+ "about": "The subtopologies that make up this topology." },
+ { "name": "GlobalStores", "type": "[]TopologyDescriptionGlobalStore", "versions": "0+",
+ "about": "Global state stores used by this topology." }
+ ]},
+ { "name": "TopologyDescriptionSubtopology", "versions": "0+", "fields": [
Review Comment:
KIP-1331 names these structs Subtopology / TopologyNode / GlobalStore. Here they're prefixed (TopologyDescriptionSubtopology etc.) — reasonable, and wire-compatible since the struct name isn't serialized. I updated the KIP.
##########
clients/src/main/resources/common/message/StreamsGroupDescribeResponse.json:
##########
@@ -106,7 +107,12 @@
"about": "True for classic members that have not been upgraded yet." }
]},
{ "name": "AuthorizedOperations", "type": "int32", "versions": "0+", "default": "-2147483648",
- "about": "32-bit bitfield to represent authorized operations for this group." }
+ "about": "32-bit bitfield to represent authorized operations for this group." },
+ { "name": "TopologyDescription", "type": "TopologyDescription", "versions": "1+",
+ "nullableVersions": "1+", "default": "null",
+ "about": "The full topology description for this group. Non-null if and only if TopologyDescriptionStatus is AVAILABLE (3); null otherwise." },
+ { "name": "TopologyDescriptionStatus", "type": "int8", "versions": "1+", "default": "0",
Review Comment:
Yes! We did something similar in StreamsGroupHeartbeatResponse.Status. It's not public interface, so it's not in the interface, but it's more readable and shared. Please do it.
##########
clients/src/main/resources/common/message/StreamsGroupTopologyDescriptionUpdateRequest.json:
##########
@@ -0,0 +1,71 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+ "apiKey": 93,
+ "type": "request",
+ "listeners": ["broker"],
+ "name": "StreamsGroupTopologyDescriptionUpdateRequest",
+ // The broker handler is not yet implemented (deferred to a later sub-task of KIP-1331),
+ // so the latest version is marked unstable to suppress ApiVersions advertisement.
+ "latestVersionUnstable": true,
Review Comment:
This new RPC is correctly marked `latestVersionUnstable` until the broker handler lands, but the three version bumps in the same PR — StreamsGroupHeartbeat v1, StreamsGroupDescribe v1, and DeleteGroups v3 — are not. Should these three bumps get the same treatment until their handlers are wired up? That would also potentially allow other features to land in the same release without an additional feature version bump.
Please make sure to create a subtask to mark everything stable before the release.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20620: Add StreamsGroupTopologyDescriptionUpdate RPC schema and extend StreamsGroupDescribe/Heartbeat [kafka]
Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru commented on code in PR #22397:
URL: https://github.com/apache/kafka/pull/22397#discussion_r3317560468
##########
clients/src/main/resources/common/message/StreamsGroupDescribeRequest.json:
##########
@@ -24,6 +24,9 @@
{ "name": "GroupIds", "type": "[]string", "versions": "0+", "entityType": "groupId",
"about": "The ids of the groups to describe" },
{ "name": "IncludeAuthorizedOperations", "type": "bool", "versions": "0+",
- "about": "Whether to include authorized operations." }
+ "about": "Whether to include authorized operations." },
+ { "name": "IncludeTopologyDescription", "type": "bool", "versions": "0+",
Review Comment:
The KIP states that we use a request version bump instead of a tagged field
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20620: Add StreamsGroupTopologyDescriptionUpdate RPC schema and extend StreamsGroupDescribe/Heartbeat [kafka]
Posted by "aliehsaeedii (via GitHub)" <gi...@apache.org>.
aliehsaeedii commented on code in PR #22397:
URL: https://github.com/apache/kafka/pull/22397#discussion_r3340097036
##########
clients/src/main/resources/common/message/StreamsGroupDescribeResponse.json:
##########
@@ -106,7 +107,12 @@
"about": "True for classic members that have not been upgraded yet." }
]},
{ "name": "AuthorizedOperations", "type": "int32", "versions": "0+", "default": "-2147483648",
- "about": "32-bit bitfield to represent authorized operations for this group." }
+ "about": "32-bit bitfield to represent authorized operations for this group." },
+ { "name": "TopologyDescription", "type": "TopologyDescription", "versions": "1+",
+ "nullableVersions": "1+", "default": "null",
+ "about": "The full topology description for this group. Non-null if and only if TopologyDescriptionStatus is AVAILABLE (3); null otherwise." },
+ { "name": "TopologyDescriptionStatus", "type": "int8", "versions": "1+", "default": "0",
Review Comment:
Do you agree with this suggestion?
The `int8` status values (0–3) are documented only in this prose `about`, and since the message generator emits no enum for an `int8`, every Java call site uses a bare cast — `setTopologyDescriptionStatus((byte) 2)` in `StreamsGroupDescribeRequest`, `(byte) 1/3` in the tests. Worth defining shared named constants for these status values so the meanings don't drift across call sites.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org