Summary
Add DESCRIBE_GROUPS (API key 15) to the KafkaApi enum and
KafkaRequestBeginEx / KafkaResponseBeginEx unions. Required by the
mcp_kafka describe_consumer_group tool.
Required changes to kafka.idl
Add to KafkaApi enum:
Add new request and response structs:
struct KafkaDescribeGroupMember
{
string16 memberId;
string16 clientId;
string16 clientHost;
varint32 metadataLen;
octets[metadataLen] metadata = null;
varint32 assignmentLen;
octets[assignmentLen] assignment = null;
}
struct KafkaDescribeGroupInfo
{
int16 error;
string16 groupId;
string16 groupState;
string16 protocolType;
string16 protocol;
KafkaDescribeGroupMember[] members;
}
struct KafkaDescribeGroupsRequestBeginEx
{
string16[] groupIds;
uint8 includeAuthorizedOperations;
}
struct KafkaDescribeGroupsResponseBeginEx
{
int32 throttle;
KafkaDescribeGroupInfo[] groups;
}
Add to KafkaRequestBeginEx union:
case 15: kafka::stream::KafkaDescribeGroupsRequestBeginEx describeGroups;
Add to KafkaResponseBeginEx union:
case 15: kafka::stream::KafkaDescribeGroupsResponseBeginEx describeGroups;
Notes
Per-partition lag calculation for describe_consumer_group is the
responsibility of mcp_kafka, not binding-kafka. binding-kafka provides
raw group membership and assignment data; mcp_kafka combines this with
KafkaOffsetFetchBeginEx and latest offsets from KafkaFetchBeginEx to
compute lag.
Spec test coverage
Add scenarios to specs/binding-kafka.spec/ covering:
DescribeGroups for a single active group with members and assignments
DescribeGroups for an empty/dead group
DescribeGroups for multiple groups in a single request
- Error response for unknown group
Additional context
Summary
Add
DESCRIBE_GROUPS(API key 15) to theKafkaApienum andKafkaRequestBeginEx/KafkaResponseBeginExunions. Required by themcp_kafkadescribe_consumer_grouptool.Required changes to kafka.idl
Add to
KafkaApienum:Add new request and response structs:
Add to
KafkaRequestBeginExunion:Add to
KafkaResponseBeginExunion:Notes
Per-partition lag calculation for
describe_consumer_groupis theresponsibility of
mcp_kafka, notbinding-kafka.binding-kafkaprovidesraw group membership and assignment data;
mcp_kafkacombines this withKafkaOffsetFetchBeginExand latest offsets fromKafkaFetchBeginExtocompute lag.
Spec test coverage
Add scenarios to
specs/binding-kafka.spec/covering:DescribeGroupsfor a single active group with members and assignmentsDescribeGroupsfor an empty/dead groupDescribeGroupsfor multiple groups in a single requestAdditional context