Skip to content

Commit

Permalink
Merge pull request #833 from twmb/proto-3.8.0
Browse files Browse the repository at this point in the history
Proto 3.8.0
  • Loading branch information
twmb authored Oct 15, 2024
2 parents b66ceb7 + 0d24bb5 commit 03ae400
Show file tree
Hide file tree
Showing 12 changed files with 1,465 additions and 60 deletions.
2 changes: 1 addition & 1 deletion generate/definitions/00_produce
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Note that the special client ID "__admin_client" will allow you to produce
// records to internal topics. This is generally recommended if you want to
// break your Kafka cluster.
ProduceRequest => key 0, max version 10, flexible v9+
ProduceRequest => key 0, max version 11, flexible v9+
// TransactionID is the transaction ID to use for this request, allowing for
// exactly once semantics.
TransactionID: nullable-string // v3+
Expand Down
2 changes: 1 addition & 1 deletion generate/definitions/10_find_coordinator
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This coordinator is different from the broker leader coordinator. This
// coordinator is the partition leader for the partition that is storing
// the group or transaction ID.
FindCoordinatorRequest => key 10, max version 4, flexible v3+
FindCoordinatorRequest => key 10, max version 5, flexible v3+
// CoordinatorKey is the ID to use for finding the coordinator. For groups,
// this is the group name, for transactional producer, this is the
// transactional ID.
Expand Down
7 changes: 6 additions & 1 deletion generate/definitions/16_list_groups
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// ListGroupsRequest issues a request to list all groups.
//
// To list all groups in a cluster, this must be issued to every broker.
ListGroupsRequest => key 16, max version 4, flexible v3+
ListGroupsRequest => key 16, max version 5, flexible v3+
// StatesFilter, proposed in KIP-518 and introduced in Kafka 2.6.0,
// allows filtering groups by state, where a state is any of
// "Preparing", "PreparingRebalance", "CompletingRebalance", "Stable",
// "Dead", or "Empty". If empty, all groups are returned.
StatesFilter: [string] // v4+
// TypesFilter, part of KIP-848, filters the types of groups we want
// to list. If empty, all groups are returned.
TypesFilter: [string] // v5+

// ListGroupsResponse is returned from a ListGroupsRequest.
ListGroupsResponse =>
Expand All @@ -25,3 +28,5 @@ ListGroupsResponse =>
ProtocolType: string
// The group state.
GroupState: string // v4+
// The group type.
GroupType: string // v5+
2 changes: 1 addition & 1 deletion generate/definitions/22_init_producer_id
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Note that you do not need to go to a txn coordinator if you are initializing
// a producer id without a transactional id.
InitProducerIDRequest => key 22, max version 4, flexible v2+, txn coordinator
InitProducerIDRequest => key 22, max version 5, flexible v2+, txn coordinator
// TransactionalID is the ID to use for transactions if using transactions.
TransactionalID: nullable-string
// TransactionTimeoutMillis is how long a transaction is allowed before
Expand Down
2 changes: 1 addition & 1 deletion generate/definitions/24_add_partitions_to_txn
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
// Version 4 adds VerifyOnly field to check if partitions are already in
// transaction and adds support to batch multiple transactions.
AddPartitionsToTxnRequest => key 24, max version 4, flexible v3+, txn coordinator
AddPartitionsToTxnRequest => key 24, max version 5, flexible v3+, txn coordinator
// TransactionalID is the transactional ID to use for this request.
TransactionalID: string // v0-v3
// ProducerID is the producer ID of the client for this transactional ID
Expand Down
2 changes: 1 addition & 1 deletion generate/definitions/25_add_offsets_to_txn
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Internally, this request simply adds the __consumer_offsets topic as a
// partition for this transaction with AddPartitionsToTxn for the partition
// in that topic that contains the group.
AddOffsetsToTxnRequest => key 25, max version 3, flexible v3+, txn coordinator
AddOffsetsToTxnRequest => key 25, max version 4, flexible v3+, txn coordinator
// TransactionalID is the transactional ID to use for this request.
TransactionalID: string
// ProducerID is the producer ID of the client for this transactional ID
Expand Down
2 changes: 1 addition & 1 deletion generate/definitions/26_end_txn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// EndTxnRequest ends a transaction. This should be called after
// TxnOffsetCommitRequest.
EndTxnRequest => key 26, max version 3, flexible v3+, txn coordinator
EndTxnRequest => key 26, max version 4, flexible v3+, txn coordinator
// TransactionalID is the transactional ID to use for this request.
TransactionalID: string
// ProducerID is the producer ID of the client for this transactional ID
Expand Down
2 changes: 1 addition & 1 deletion generate/definitions/28_txn_offset_commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// TxnOffsetCommitRequest sends offsets that are a part of this transaction
// to be committed once the transaction itself finishes. This effectively
// replaces OffsetCommitRequest for when using transactions.
TxnOffsetCommitRequest => key 28, max version 3, flexible v3+, group coordinator
TxnOffsetCommitRequest => key 28, max version 4, flexible v3+, group coordinator
// TransactionalID is the transactional ID to use for this request.
TransactionalID: string
// Group is the group consumed in this transaction and to be used for
Expand Down
6 changes: 5 additions & 1 deletion generate/definitions/66_list_transactions
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ ListTransactionsRequest => key 66, max version 0, flexible v0+
StateFilters: [string]
// The producer IDs to filter by: if empty, all transactions will be
// returned; if non-empty, only transactions which match one of the filtered
// producer IDs will be returned
// producer IDs will be returned.
ProducerIDFilters: [int64]
// Duration (in millis) to filter by: if < 0, all transactions will be
// returned; otherwise, only transactions running longer than this duration
// will be returned.
DurationFilterMillis: int64(-1) // v1+

// ListTransactionsResponse is a response to a ListTransactionsRequest.
ListTransactionsResponse =>
Expand Down
67 changes: 67 additions & 0 deletions generate/definitions/69_consumer_group_describe
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Assignment contains consumer group assignments.
Assignment => not top level, no encoding, flexible v0+
// The topics & partitions assigned to the member.
TopicPartitions: [=>]
TopicID: uuid
Topic: string
Partitions: [int32]

// ConsumerGroupDescribe is a part of KIP-848; this is the
// "next generation" equivalent of DescribeGroups.
ConsumerGroupDescribeRequest => key 69, max version 0, flexible v0+
// The IDs of the groups to describe.
Groups: [string]
// Whether to include authorized operations.
IncludeAuthorizedOperations: bool

// ConsumerGroupDescribeResponse is returned from a ConsumerGroupDescribeRequest.
ConsumerGroupDescribeResponse =>
ThrottleMillis
Groups: [=>]
// ErrorCode is the error for this response.
//
// Supported errors:
// - GROUP_AUTHORIZATION_FAILED (version 0+)
// - NOT_COORDINATOR (version 0+)
// - COORDINATOR_NOT_AVAILABLE (version 0+)
// - COORDINATOR_LOAD_IN_PROGRESS (version 0+)
// - INVALID_REQUEST (version 0+)
// - INVALID_GROUP_ID (version 0+)
// - GROUP_ID_NOT_FOUND (version 0+)
ErrorCode: int16
// A supplementary message if this errored.
ErrorMessage: nullable-string
// The group ID.
Group: string
// The group state.
State: string
// The group epoch.
Epoch: int32
// The assignment epoch.
AssignmentEpoch: int32
// The selected assignor.
AssignorName: string
// Members of the group.
Members: [=>]
// The member ID.
MemberID: string
// The member instance ID, if any.
InstanceID: nullable-string
// The member rack ID, if any.
RackID: nullable-string
// The current member epoch.
MemberEpoch: int32
// The client ID.
ClientID: string
// The client host.
ClientHost: string
// The subscribed topic names.
SubscribedTopics: [string]
// The subscribed topic regex, if any.
SubscribedTopicRegex: nullable-string
// The current assignment.
Assignment: Assignment
// The target assignment.
TargetAssignment: Assignment
// 32 bit bitfield representing authorized operations for the group.
AuthorizedOperations: int32(-2147483648)
6 changes: 3 additions & 3 deletions generate/definitions/misc
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ GroupMetadataKey => not top level, with version field
//
// KAFKA-7862 commit 0f995ba6be, proposed in KIP-345 and included in 2.3.0
// released version 3.
GroupMetadataValue => not top level, with version field
GroupMetadataValue => not top level, with version field, flexible v4+
// Version is the version of this value.
Version: int16
// ProtocolType is the type of protocol being used for the group
Expand All @@ -287,7 +287,7 @@ GroupMetadataValue => not top level, with version field
Leader: nullable-string
// CurrentStateTimestamp is the timestamp for this state of the group
// (stable, etc.).
CurrentStateTimestamp: int64 // v2+
CurrentStateTimestamp: int64(-1) // v2+
// Members are the group members.
Members: [=>]
// MemberID is a group member.
Expand All @@ -299,7 +299,7 @@ GroupMetadataValue => not top level, with version field
// ClientHost is the hostname of this group member.
ClientHost: string
// RebalanceTimeoutMillis is the rebalance timeout of this group member.
RebalanceTimeoutMillis: int32 // v1+
RebalanceTimeoutMillis: int32(-1) // v1+
// SessionTimeoutMillis is the session timeout of this group member.
SessionTimeoutMillis: int32
// Subscription is the subscription of this group member.
Expand Down
Loading

0 comments on commit 03ae400

Please sign in to comment.