Skip to content

Commit

Permalink
KIP-500 (actually KIP-631): add BrokerRegistration and BrokerHeartbeat
Browse files Browse the repository at this point in the history
The commit introducing these mentions KIP-500, but the description of
these requests is actually in KIP-631.
  • Loading branch information
twmb committed Feb 3, 2021
1 parent 625146e commit ab66776
Show file tree
Hide file tree
Showing 4 changed files with 767 additions and 1 deletion.
37 changes: 37 additions & 0 deletions generate/definitions/62_broker_registration
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// For KIP-500, BrokerRegistrationRequest is an internal broker-to-broker only
// request.
BrokerRegistrationRequest => key 62, max version 0, flexible v0+
// The broker ID.
BrokerID: int32
// The cluster ID of the broker process.
ClusterID: uuid
// The incarnation ID of the broker process.
IncarnationID: uuid
// The listeners for this broker.
Listeners: [=>]
// The name of this endpoint.
Name: string
// The hostname.
Host: string
// The port.
Port: uint16
// The security protocol.
SecurityProtocol: int16
// Features on this broker.
Features: [=>]
// The name of the feature.
Name: string
// The minimum supported feature level.
MinSupportedVersion: int16
// The maximum supported feature level.
MaxSupportedVersion: int16
// The rack that this broker is in, if any.
Rack: nullable-string

// BrokerRegistrationResponse is a response to a BrokerRegistrationRequest.
BrokerRegistrationResponse =>
ThrottleMillis
// Any error code, or 0.
ErrorCode: int16
// The broker's assigned epoch, or -1 if none was assigned.
BrokerEpoch: int64(-1)
25 changes: 25 additions & 0 deletions generate/definitions/63_broker_heartbeat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// For KIP-500, BrokerHeartbeatRequest is an internal broker-to-broker only
// request.
BrokerHeartbeatRequest => key 63, max version 0, flexible v0+
// The broker ID.
BrokerID: int32
// The broker's epoch.
BrokerEpoch: int64(-1)
// The highest metadata offset that the broker has reached.
CurrentMetadataOffset: int64
// True if the broker wants to be fenced.
WantFence: bool
// True if the broker wants to be shutdown.
WantShutdown: bool

// BrokerHeartbeatResponse is a response to a BrokerHeartbeatRequest.
BrokerHeartbeatResponse =>
ThrottleMillis
// Any error code, or 0.
ErrorCode: int16
// True if the broker has approximately caught up with the latest metadata.
IsCaughtUp: bool
// True if the broker is fenced.
IsFenced: bool(true)
// True if the broker should proceed with its shutdown.
ShouldShutdown: bool
Loading

0 comments on commit ab66776

Please sign in to comment.