Versions in this module Expand all Collapse all v1 v1.5.0 Jan 30, 2026 Changes in this version + const CLUSTER_AUTHORIZATION_FAILED + const GROUP_AUTHORIZATION_FAILED v1.4.2 Jan 19, 2026 Changes in this version + const APIKeyAlterConfigs + const APIKeyApiVersion + const APIKeyCreatePartitions + const APIKeyCreateTopics + const APIKeyDeleteGroups + const APIKeyDeleteTopics + const APIKeyDescribeConfigs + const APIKeyDescribeGroups + const APIKeyFetch + const APIKeyFindCoordinator + const APIKeyHeartbeat + const APIKeyJoinGroup + const APIKeyLeaveGroup + const APIKeyListGroups + const APIKeyListOffsets + const APIKeyMetadata + const APIKeyOffsetCommit + const APIKeyOffsetFetch + const APIKeyOffsetForLeaderEpoch + const APIKeyProduce + const APIKeySyncGroup + const COORDINATOR_LOAD_IN_PROGRESS + const COORDINATOR_NOT_AVAILABLE + const ConfigResourceBroker + const ConfigResourceTopic + const ConfigSourceDefaultConfig + const ConfigSourceDynamicBroker + const ConfigSourceDynamicTopic + const ConfigSourceGroupConfig + const ConfigSourceStaticBroker + const ConfigSourceUnknown + const ConfigTypeBoolean + const ConfigTypeClass + const ConfigTypeDouble + const ConfigTypeInt + const ConfigTypeList + const ConfigTypeLong + const ConfigTypePassword + const ConfigTypeShort + const ConfigTypeString + const GROUP_ID_NOT_FOUND + const ILLEGAL_GENERATION + const INVALID_CONFIG + const INVALID_PARTITIONS + const INVALID_REQUEST + const INVALID_TOPIC_EXCEPTION + const NONE + const OFFSET_OUT_OF_RANGE + const REBALANCE_IN_PROGRESS + const REQUEST_TIMED_OUT + const TOPIC_ALREADY_EXISTS + const TOPIC_AUTHORIZATION_FAILED + const UNKNOWN_MEMBER_ID + const UNKNOWN_SERVER_ERROR + const UNKNOWN_TOPIC_ID + const UNKNOWN_TOPIC_OR_PARTITION + const UNSUPPORTED_VERSION + func EncodeAlterConfigsResponse(resp *AlterConfigsResponse, version int16) ([]byte, error) + func EncodeApiVersionsResponse(resp *ApiVersionsResponse, version int16) ([]byte, error) + func EncodeCreatePartitionsResponse(resp *CreatePartitionsResponse, version int16) ([]byte, error) + func EncodeCreateTopicsResponse(resp *CreateTopicsResponse, version int16) ([]byte, error) + func EncodeDeleteGroupsResponse(resp *DeleteGroupsResponse, version int16) ([]byte, error) + func EncodeDeleteTopicsResponse(resp *DeleteTopicsResponse, version int16) ([]byte, error) + func EncodeDescribeConfigsResponse(resp *DescribeConfigsResponse, version int16) ([]byte, error) + func EncodeDescribeGroupsResponse(resp *DescribeGroupsResponse, version int16) ([]byte, error) + func EncodeFetchResponse(resp *FetchResponse, version int16) ([]byte, error) + func EncodeFindCoordinatorResponse(resp *FindCoordinatorResponse, version int16) ([]byte, error) + func EncodeHeartbeatResponse(resp *HeartbeatResponse, version int16) ([]byte, error) + func EncodeJoinGroupResponse(resp *JoinGroupResponse, version int16) ([]byte, error) + func EncodeLeaveGroupResponse(resp *LeaveGroupResponse) ([]byte, error) + func EncodeListGroupsResponse(resp *ListGroupsResponse, version int16) ([]byte, error) + func EncodeListOffsetsResponse(version int16, resp *ListOffsetsResponse) ([]byte, error) + func EncodeMetadataResponse(resp *MetadataResponse, version int16) ([]byte, error) + func EncodeOffsetCommitResponse(resp *OffsetCommitResponse) ([]byte, error) + func EncodeOffsetFetchResponse(resp *OffsetFetchResponse, version int16) ([]byte, error) + func EncodeOffsetForLeaderEpochResponse(resp *OffsetForLeaderEpochResponse, version int16) ([]byte, error) + func EncodeProduceResponse(resp *ProduceResponse, version int16) ([]byte, error) + func EncodeResponse(payload []byte) ([]byte, error) + func EncodeSyncGroupResponse(resp *SyncGroupResponse, version int16) ([]byte, error) + func ParseRequest(b []byte) (*RequestHeader, Request, error) + func WriteFrame(w io.Writer, payload []byte) error + type AlterConfigsRequest struct + Resources []AlterConfigsResource + ValidateOnly bool + func (AlterConfigsRequest) APIKey() int16 + type AlterConfigsResource struct + Configs []AlterConfigsResourceConfig + ResourceName string + ResourceType int8 + type AlterConfigsResourceConfig struct + Name string + Value *string + type AlterConfigsResponse struct + CorrelationID int32 + Resources []AlterConfigsResponseResource + ThrottleMs int32 + type AlterConfigsResponseResource struct + ErrorCode int16 + ErrorMessage *string + ResourceName string + ResourceType int8 + type ApiVersion struct + APIKey int16 + MaxVersion int16 + MinVersion int16 + type ApiVersionsRequest struct + ClientSoftwareName string + ClientSoftwareVersion string + func (ApiVersionsRequest) APIKey() int16 + type ApiVersionsResponse struct + CorrelationID int32 + ErrorCode int16 + ThrottleMs int32 + Versions []ApiVersion + type CreatePartitionsAssignment struct + Replicas []int32 + type CreatePartitionsRequest struct + TimeoutMs int32 + Topics []CreatePartitionsTopic + ValidateOnly bool + func (CreatePartitionsRequest) APIKey() int16 + type CreatePartitionsResponse struct + CorrelationID int32 + ThrottleMs int32 + Topics []CreatePartitionsResponseTopic + type CreatePartitionsResponseTopic struct + ErrorCode int16 + ErrorMessage *string + Name string + type CreatePartitionsTopic struct + Assignments []CreatePartitionsAssignment + Count int32 + Name string + type CreateTopicConfig struct + Name string + NumPartitions int32 + ReplicationFactor int16 + type CreateTopicResult struct + ErrorCode int16 + ErrorMessage string + Name string + type CreateTopicsRequest struct + TimeoutMs int32 + Topics []CreateTopicConfig + ValidateOnly bool + func (CreateTopicsRequest) APIKey() int16 + type CreateTopicsResponse struct + CorrelationID int32 + ThrottleMs int32 + Topics []CreateTopicResult + type DeleteGroupsRequest struct + Groups []string + func (DeleteGroupsRequest) APIKey() int16 + type DeleteGroupsResponse struct + CorrelationID int32 + Groups []DeleteGroupsResponseGroup + ThrottleMs int32 + type DeleteGroupsResponseGroup struct + ErrorCode int16 + Group string + type DeleteTopicResult struct + ErrorCode int16 + ErrorMessage string + Name string + type DeleteTopicsRequest struct + TimeoutMs int32 + TopicNames []string + func (DeleteTopicsRequest) APIKey() int16 + type DeleteTopicsResponse struct + CorrelationID int32 + ThrottleMs int32 + Topics []DeleteTopicResult + type DescribeConfigsRequest struct + IncludeDocumentation bool + IncludeSynonyms bool + Resources []DescribeConfigsResource + func (DescribeConfigsRequest) APIKey() int16 + type DescribeConfigsResource struct + ConfigNames []string + ResourceName string + ResourceType int8 + type DescribeConfigsResponse struct + CorrelationID int32 + Resources []DescribeConfigsResponseResource + ThrottleMs int32 + type DescribeConfigsResponseConfig struct + ConfigType int8 + Documentation *string + IsDefault bool + IsSensitive bool + Name string + ReadOnly bool + Source int8 + Synonyms []DescribeConfigsResponseConfigSynonym + Value *string + type DescribeConfigsResponseConfigSynonym struct + Name string + Source int8 + Value *string + type DescribeConfigsResponseResource struct + Configs []DescribeConfigsResponseConfig + ErrorCode int16 + ErrorMessage *string + ResourceName string + ResourceType int8 + type DescribeGroupsRequest struct + Groups []string + IncludeAuthorizedOperations bool + func (DescribeGroupsRequest) APIKey() int16 + type DescribeGroupsResponse struct + CorrelationID int32 + Groups []DescribeGroupsResponseGroup + ThrottleMs int32 + type DescribeGroupsResponseGroup struct + AuthorizedOperations int32 + ErrorCode int16 + GroupID string + Members []DescribeGroupsResponseGroupMember + Protocol string + ProtocolType string + State string + type DescribeGroupsResponseGroupMember struct + ClientHost string + ClientID string + InstanceID *string + MemberAssignment []byte + MemberID string + ProtocolMetadata []byte + type FetchAbortedTransaction struct + FirstOffset int64 + ProducerID int64 + type FetchPartitionRequest struct + FetchOffset int64 + MaxBytes int32 + Partition int32 + type FetchPartitionResponse struct + AbortedTransactions []FetchAbortedTransaction + ErrorCode int16 + HighWatermark int64 + LastStableOffset int64 + LogStartOffset int64 + Partition int32 + PreferredReadReplica int32 + RecordSet []byte + type FetchRequest struct + IsolationLevel int8 + MaxBytes int32 + MaxWaitMs int32 + MinBytes int32 + ReplicaID int32 + SessionEpoch int32 + SessionID int32 + Topics []FetchTopicRequest + func (FetchRequest) APIKey() int16 + type FetchResponse struct + CorrelationID int32 + ErrorCode int16 + SessionID int32 + ThrottleMs int32 + Topics []FetchTopicResponse + type FetchTopicRequest struct + Name string + Partitions []FetchPartitionRequest + TopicID [16]byte + type FetchTopicResponse struct + Name string + Partitions []FetchPartitionResponse + TopicID [16]byte + type FindCoordinatorRequest struct + Key string + KeyType int8 + func (FindCoordinatorRequest) APIKey() int16 + type FindCoordinatorResponse struct + CorrelationID int32 + ErrorCode int16 + ErrorMessage *string + Host string + NodeID int32 + Port int32 + ThrottleMs int32 + type Frame struct + Length int32 + Payload []byte + func ReadFrame(r io.Reader) (*Frame, error) + type HeartbeatRequest struct + GenerationID int32 + GroupID string + InstanceID *string + MemberID string + func (HeartbeatRequest) APIKey() int16 + type HeartbeatResponse struct + CorrelationID int32 + ErrorCode int16 + ThrottleMs int32 + type JoinGroupMember struct + InstanceID *string + MemberID string + Metadata []byte + type JoinGroupProtocol struct + Metadata []byte + Name string + type JoinGroupRequest struct + GroupID string + MemberID string + ProtocolType string + Protocols []JoinGroupProtocol + RebalanceTimeoutMs int32 + SessionTimeoutMs int32 + func (JoinGroupRequest) APIKey() int16 + type JoinGroupResponse struct + CorrelationID int32 + ErrorCode int16 + GenerationID int32 + LeaderID string + MemberID string + Members []JoinGroupMember + ProtocolName string + ThrottleMs int32 + type LeaveGroupRequest struct + GroupID string + MemberID string + func (LeaveGroupRequest) APIKey() int16 + type LeaveGroupResponse struct + CorrelationID int32 + ErrorCode int16 + type ListGroupsRequest struct + StatesFilter []string + TypesFilter []string + func (ListGroupsRequest) APIKey() int16 + type ListGroupsResponse struct + CorrelationID int32 + ErrorCode int16 + Groups []ListGroupsResponseGroup + ThrottleMs int32 + type ListGroupsResponseGroup struct + GroupID string + GroupState string + GroupType string + ProtocolType string + type ListOffsetsPartition struct + CurrentLeaderEpoch int32 + MaxNumOffsets int32 + Partition int32 + Timestamp int64 + type ListOffsetsPartitionResponse struct + ErrorCode int16 + LeaderEpoch int32 + Offset int64 + OldStyleOffsets []int64 + Partition int32 + Timestamp int64 + type ListOffsetsRequest struct + IsolationLevel int8 + ReplicaID int32 + Topics []ListOffsetsTopic + func (ListOffsetsRequest) APIKey() int16 + type ListOffsetsResponse struct + CorrelationID int32 + ThrottleMs int32 + Topics []ListOffsetsTopicResponse + type ListOffsetsTopic struct + Name string + Partitions []ListOffsetsPartition + type ListOffsetsTopicResponse struct + Name string + Partitions []ListOffsetsPartitionResponse + type MetadataBroker struct + Host string + NodeID int32 + Port int32 + Rack *string + type MetadataPartition struct + ErrorCode int16 + ISRNodes []int32 + LeaderEpoch int32 + LeaderID int32 + OfflineReplicas []int32 + PartitionIndex int32 + ReplicaNodes []int32 + type MetadataRequest struct + AllowAutoTopicCreation bool + IncludeClusterAuthOps bool + IncludeTopicAuthOps bool + TopicIDs [][16]byte + Topics []string + func (MetadataRequest) APIKey() int16 + type MetadataResponse struct + Brokers []MetadataBroker + ClusterAuthorizedOperations int32 + ClusterID *string + ControllerID int32 + CorrelationID int32 + ThrottleMs int32 + Topics []MetadataTopic + type MetadataTopic struct + ErrorCode int16 + IsInternal bool + Name string + Partitions []MetadataPartition + TopicAuthorizedOperations int32 + TopicID [16]byte + type OffsetCommitPartition struct + Metadata string + Offset int64 + Partition int32 + type OffsetCommitPartitionResponse struct + ErrorCode int16 + Partition int32 + type OffsetCommitRequest struct + GenerationID int32 + GroupID string + MemberID string + RetentionMs int64 + Topics []OffsetCommitTopic + func (OffsetCommitRequest) APIKey() int16 + type OffsetCommitResponse struct + CorrelationID int32 + ThrottleMs int32 + Topics []OffsetCommitTopicResponse + type OffsetCommitTopic struct + Name string + Partitions []OffsetCommitPartition + type OffsetCommitTopicResponse struct + Name string + Partitions []OffsetCommitPartitionResponse + type OffsetFetchPartition struct + Partition int32 + type OffsetFetchPartitionResponse struct + ErrorCode int16 + LeaderEpoch int32 + Metadata *string + Offset int64 + Partition int32 + type OffsetFetchRequest struct + GroupID string + Topics []OffsetFetchTopic + func (OffsetFetchRequest) APIKey() int16 + type OffsetFetchResponse struct + CorrelationID int32 + ErrorCode int16 + ThrottleMs int32 + Topics []OffsetFetchTopicResponse + type OffsetFetchTopic struct + Name string + Partitions []OffsetFetchPartition + type OffsetFetchTopicResponse struct + Name string + Partitions []OffsetFetchPartitionResponse + type OffsetForLeaderEpochPartition struct + CurrentLeaderEpoch int32 + LeaderEpoch int32 + Partition int32 + type OffsetForLeaderEpochPartitionResponse struct + EndOffset int64 + ErrorCode int16 + LeaderEpoch int32 + Partition int32 + type OffsetForLeaderEpochRequest struct + ReplicaID int32 + Topics []OffsetForLeaderEpochTopic + func (OffsetForLeaderEpochRequest) APIKey() int16 + type OffsetForLeaderEpochResponse struct + CorrelationID int32 + ThrottleMs int32 + Topics []OffsetForLeaderEpochTopicResponse + type OffsetForLeaderEpochTopic struct + Name string + Partitions []OffsetForLeaderEpochPartition + type OffsetForLeaderEpochTopicResponse struct + Name string + Partitions []OffsetForLeaderEpochPartitionResponse + type ProducePartition struct + Partition int32 + Records []byte + type ProducePartitionResponse struct + BaseOffset int64 + ErrorCode int16 + LogAppendTimeMs int64 + LogStartOffset int64 + Partition int32 + type ProduceRequest struct + Acks int16 + TimeoutMs int32 + Topics []ProduceTopic + TransactionalID *string + func (ProduceRequest) APIKey() int16 + type ProduceResponse struct + CorrelationID int32 + ThrottleMs int32 + Topics []ProduceTopicResponse + type ProduceTopic struct + Name string + Partitions []ProducePartition + type ProduceTopicResponse struct + Name string + Partitions []ProducePartitionResponse + type Request interface + APIKey func() int16 + type RequestHeader struct + APIKey int16 + APIVersion int16 + ClientID *string + CorrelationID int32 + func ParseRequestHeader(b []byte) (*RequestHeader, *byteReader, error) + type SyncGroupAssignment struct + Assignment []byte + MemberID string + type SyncGroupRequest struct + Assignments []SyncGroupAssignment + GenerationID int32 + GroupID string + MemberID string + func (SyncGroupRequest) APIKey() int16 + type SyncGroupResponse struct + Assignment []byte + CorrelationID int32 + ErrorCode int16 + ProtocolName *string + ProtocolType *string + ThrottleMs int32