Categorygithub.com/Merapi-Tani-Instrument/kafka-client
modulepackage
0.0.0-20240912132414-ea2f6cbcb402
Repository: https://github.com/merapi-tani-instrument/kafka-client.git
Documentation: pkg.go.dev

# Functions

NewBalanceStrategyRange returns a range balance strategy, which is the default and assigns partitions as ranges to consumer group members.
NewBalanceStrategyRoundRobin returns a round-robin balance strategy, which assigns partitions to members in alternating order.
NewBalanceStrategySticky returns a sticky balance strategy, which assigns partitions to members with an attempt to preserve earlier assignments while maintain a balanced partition distribution.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

CompressionGZIP compression using GZIP.
CompressionLevelDefault is the constant to use in CompressionLevel to have the default compression level for any codec.
CompressionLZ4 compression using LZ4.
CompressionNone no compression.
CompressionSnappy compression using snappy.
CompressionZSTD compression using ZSTD.
ControlRecordAbort is a control record for abort.
ControlRecordCommit is a control record for commit.
ControlRecordUnknown is a control record of unknown type.
No description provided by the author
No description provided by the author
Errors.BROKER_NOT_AVAILABLE.
Errors.CLUSTER_AUTHORIZATION_FAILED.
Errors.CONCURRENT_TRANSACTIONS.
Errors.COORDINATOR_NOT_AVAILABLE.
Errors.DELEGATION_TOKEN_AUTH_DISABLED.
Errors.DELEGATION_TOKEN_AUTHORIZATION_FAILED.
Errors.DELEGATION_TOKEN_EXPIRED.
Errors.DELEGATION_TOKEN_NOT_FOUND.
Errors.DELEGATION_TOKEN_OWNER_MISMATCH.
Errors.DELEGATION_TOKEN_REQUEST_NOT_ALLOWED.
Errors.DUPLICATE_SEQUENCE_NUMBER.
Errors.ELECTION_NOT_NEEDED.
Errors.ELIGIBLE_LEADERS_NOT_AVAILABLE.
Errors.FENCED_INSTANCE_ID.
Errors.FENCED_LEADER_EPOCH.
Errors.FETCH_SESSION_ID_NOT_FOUND.
Errors.GROUP_AUTHORIZATION_FAILED.
Errors.GROUP_ID_NOT_FOUND.
Errors.GROUP_MAX_SIZE_REACHED.
Errors.GROUP_SUBSCRIBED_TO_TOPIC.
Errors.ILLEGAL_GENERATION.
Errors.ILLEGAL_SASL_STATE.
Errors.INCONSISTENT_GROUP_PROTOCOL.
Errors.INVALID_COMMIT_OFFSET_SIZE.
Errors.INVALID_CONFIG.
Errors.INVALID_FETCH_SESSION_EPOCH.
Errors.INVALID_GROUP_ID.
Errors.CORRUPT_MESSAGE.
Errors.INVALID_FETCH_SIZE.
Errors.INVALID_PARTITIONS.
Errors.INVALID_PRINCIPAL_TYPE.
Errors.INVALID_PRODUCER_EPOCH.
Errors.INVALID_PRODUCER_ID_MAPPING.
Errors.INVALID_RECORD.
Errors.INVALID_REPLICA_ASSIGNMENT.
Errors.INVALID_REPLICATION_FACTOR.
Errors.INVALID_REQUEST.
Errors.INVALID_REQUIRED_ACKS.
Errors.INVALID_SESSION_TIMEOUT.
Errors.INVALID_TIMESTAMP.
Errors.INVALID_TOPIC_EXCEPTION.
Errors.INVALID_TRANSACTION_TIMEOUT.
Errors.INVALID_TXN_STATE.
Errors.KAFKA_STORAGE_ERROR.
Errors.LEADER_NOT_AVAILABLE.
Errors.LISTENER_NOT_FOUND.
Errors.LOG_DIR_NOT_FOUND.
Errors.MEMBER_ID_REQUIRED.
Errors.RECORD_LIST_TOO_LARGE.
Errors.MESSAGE_TOO_LARGE.
Errors.NETWORK_EXCEPTION.
Errors.NONE.
Errors.NON_EMPTY_GROUP.
Errors.NO_REASSIGNMENT_IN_PROGRESS.
Errors.NOT_CONTROLLER.
Errors.NOT_COORDINATOR.
Errors.NOT_ENOUGH_REPLICAS.
Errors.NOT_ENOUGH_REPLICAS_AFTER_APPEND.
Errors.NOT_LEADER_OR_FOLLOWER.
Errors.OFFSET_METADATA_TOO_LARGE.
Errors.OFFSET_NOT_AVAILABLE.
Errors.OFFSET_OUT_OF_RANGE.
Errors.COORDINATOR_LOAD_IN_PROGRESS.
Errors.OPERATION_NOT_ATTEMPTED.
Errors.OUT_OF_ORDER_SEQUENCE_NUMBER.
Errors.POLICY_VIOLATION.
Errors.PREFERRED_LEADER_NOT_AVAILABLE.
Errors.PRODUCER_FENCED.
Errors.REASSIGNMENT_IN_PROGRESS.
Errors.REBALANCE_IN_PROGRESS.
Errors.REPLICA_NOT_AVAILABLE.
Errors.REQUEST_TIMED_OUT.
Errors.SASL_AUTHENTICATION_FAILED.
Errors.SECURITY_DISABLED.
Errors.STALE_BROKER_EPOCH.
Errors.STALE_CONTROLLER_EPOCH.
Errors.THROTTLING_QUOTA_EXCEEDED.
Errors.TOPIC_ALREADY_EXISTS.
Errors.TOPIC_AUTHORIZATION_FAILED.
Errors.TOPIC_DELETION_DISABLED.
Errors.TRANSACTIONAL_ID_AUTHORIZATION_FAILED.
Errors.TRANSACTION_COORDINATOR_FENCED.
Errors.UNKNOWN_SERVER_ERROR.
Errors.UNKNOWN_LEADER_EPOCH.
Errors.UNKNOWN_MEMBER_ID.
Errors.UNKNOWN_PRODUCER_ID.
Errors.UNKNOWN_TOPIC_OR_PARTITION.
Errors.UNSTABLE_OFFSET_COMMIT.
Errors.UNSUPPORTED_COMPRESSION_TYPE.
Errors.UNSUPPORTED_FOR_MESSAGE_FORMAT.
Errors.UNSUPPORTED_SASL_MECHANISM.
Errors.UNSUPPORTED_VERSION.
GroupGenerationUndefined is a special value for the group generation field of Offset Commit Requests that should be used when a consumer group does not rely on Kafka for partition management.
NoResponse doesn't send any response, the TCP ACK is all you get.
RangeBalanceStrategyName identifies strategies that use the range partition assignment strategy.
No description provided by the author
No description provided by the author
ReceiveTime is a special value for the timestamp field of Offset Commit Requests which tells the broker to set the timestamp to the time at which the request was received.
RoundRobinBalanceStrategyName identifies strategies that use the round-robin partition assignment strategy.
StickyBalanceStrategyName identifies strategies that use the sticky-partition assignment strategy.
WaitForAll waits for all in-sync replicas to commit before responding.
WaitForLocal waits for only the local commit to succeed before responding.

# Variables

Deprecated: use NewBalanceStrategyRange to avoid data race issue.
Deprecated: use NewBalanceStrategyRoundRobin to avoid data race issue.
Deprecated: use NewBalanceStrategySticky to avoid data race issue.
No description provided by the author
ErrAddPartitionsToTxn is returned when AddPartitionsToTxn failed multiple times.
ErrAlreadyConnected is the error returned when calling Open() on a Broker that is already connected or connecting.
var ErrClosedConsumerGroup = errors.New("kafka: tried to use a consumer group that was closed").
ErrBrokerNotFound is the error returned when there's no broker found for the requested ID.
ErrCannotTransitionNilError when transition is attempted with an nil error.
ErrClosedClient is the error returned when a method is called on a client that has been closed.
ErrConsumerOffsetNotAdvanced is returned when a partition consumer didn't advance its offset after parsing a RecordBatch.
ErrControllerNotAvailable is returned when server didn't give correct controller id.
ErrCreateACLs is the type of error returned when ACL creation failed.
ErrDeleteRecords is the type of error returned when fail to delete the required records.
ErrIncompleteResponse is the error returned when the server returns a syntactically valid response, but it does not contain the expected information.
ErrInsufficientData is returned when decoding and the packet is truncated.
ErrInvalidPartition is the error returned when a partitioner returns an invalid partition index (meaning one outside of the range [0...numPartitions-1]).
ErrMessageTooLarge is returned when the next message to consume is larger than the configured Consumer.Fetch.Max.
No description provided by the author
ErrNonTransactedProducer when calling BeginTxn, CommitTxn or AbortTxn on a non transactional producer.
No description provided by the author
ErrNotConnected is the error returned when trying to send or call Close() on a Broker that is not connected.
ErrNoTopicsToUpdateMetadata is returned when Meta.Full is set to false but no specific topics were found to update the metadata.
ErrOutOfBrokers is the error returned when the client has run out of brokers to talk to because all of them errored or otherwise failed to respond.
ErrReassignPartitions is returned when altering partition assignments for a topic fails.
ErrShuttingDown is returned when a producer receives a message during shutdown.
No description provided by the author
ErrTransactionNotReady when transaction status is invalid for the current action.
ErrTransitionNotAllowed when txnmgr state transition is not valid.
ErrTxnOffsetCommit is returned when TxnOffsetCommit failed multiple times.
ErrTxnUnableToParseResponse when response is nil.
ErrUnknownScramMechanism is returned when user tries to AlterUserScramCredentials with unknown SCRAM mechanism.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
Config is used to pass multiple configuration options to mertani's constructors.
No description provided by the author
ConsumerGroupMemberAssignment holds the member assignment for a consume group https://github.com/apache/kafka/blob/trunk/clients/src/main/resources/common/message/ConsumerProtocolAssignment.json.
ConsumerGroupMemberMetadata holds the metadata for consumer group https://github.com/apache/kafka/blob/trunk/clients/src/main/resources/common/message/ConsumerProtocolSubscription.json.
No description provided by the author
No description provided by the author
No description provided by the author
Control records are returned as a record by fetchRequest However unlike "normal" records, they mean nothing application wise.
FetchRequest (API key 1) will fetch Kafka messages.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PartitionMetadata contains each partition in the topic.
No description provided by the author
No description provided by the author
No description provided by the author
partition_responses in protocol.
No description provided by the author
No description provided by the author
No description provided by the author
Record is kafka record type.
No description provided by the author
No description provided by the author
No description provided by the author
RecordHeader stores key and value for a record header.
No description provided by the author
No description provided by the author
StickyAssignorUserDataV0 holds topic partition information for an assignment.
StickyAssignorUserDataV1 holds topic partition information for an assignment.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TopicMetadata contains each topic in the response.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

BalanceStrategy is used to balance topics and partitions across members of a consumer group.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

BalanceStrategyPlan is the results of any BalanceStrategy.Plan attempt.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ControlRecordType ...
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RequiredAcks is used in Produce Requests to tell the broker how many replica acknowledgements it must see before responding.
No description provided by the author
No description provided by the author