#[non_exhaustive]
pub enum RDKafkaErrorCode {
Show 159 variants BadMessage, BadCompression, BrokerDestroy, Fail, BrokerTransportFailure, CriticalSystemResource, Resolve, MessageTimedOut, PartitionEOF, UnknownPartition, FileSystem, UnknownTopic, AllBrokersDown, InvalidArgument, OperationTimedOut, QueueFull, ISRInsufficient, NodeUpdate, SSL, WaitingForCoordinator, UnknownGroup, InProgress, PreviousInProgress, ExistingSubscription, AssignPartitions, RevokePartitions, Conflict, State, UnknownProtocol, NotImplemented, Authentication, NoOffset, Outdated, TimedOutQueue, UnsupportedFeature, WaitCache, Interrupted, KeySerialization, ValueSerialization, KeyDeserialization, ValueDeserialization, Partial, ReadOnly, NoEnt, Underflow, InvalidType, Retry, PurgeQueue, PurgeInflight, Fatal, Inconsistent, GaplessGuarantee, PollExceeded, UnknownBroker, NotConfigured, Fenced, Application, AssignmentLost, Noop, AutoOffsetReset, Unknown, NoError, OffsetOutOfRange, InvalidMessage, UnknownTopicOrPartition, InvalidMessageSize, LeaderNotAvailable, NotLeaderForPartition, RequestTimedOut, BrokerNotAvailable, ReplicaNotAvailable, MessageSizeTooLarge, StaleControllerEpoch, OffsetMetadataTooLarge, NetworkException, CoordinatorLoadInProgress, CoordinatorNotAvailable, NotCoordinator, InvalidTopic, MessageBatchTooLarge, NotEnoughReplicas, NotEnoughReplicasAfterAppend, InvalidRequiredAcks, IllegalGeneration, InconsistentGroupProtocol, InvalidGroupId, UnknownMemberId, InvalidSessionTimeout, RebalanceInProgress, InvalidCommitOffsetSize, TopicAuthorizationFailed, GroupAuthorizationFailed, ClusterAuthorizationFailed, InvalidTimestamp, UnsupportedSASLMechanism, IllegalSASLState, UnsupportedVersion, TopicAlreadyExists, InvalidPartitions, InvalidReplicationFactor, InvalidReplicaAssignment, InvalidConfig, NotController, InvalidRequest, UnsupportedForMessageFormat, PolicyViolation, OutOfOrderSequenceNumber, DuplicateSequenceNumber, InvalidProducerEpoch, InvalidTransactionalState, InvalidProducerIdMapping, InvalidTransactionTimeout, ConcurrentTransactions, TransactionCoordinatorFenced, TransactionalIdAuthorizationFailed, SecurityDisabled, OperationNotAttempted, KafkaStorageError, LogDirNotFound, SaslAuthenticationFailed, UnknownProducerId, ReassignmentInProgress, DelegationTokenAuthDisabled, DelegationTokenNotFound, DelegationTokenOwnerMismatch, DelegationTokenRequestNotAllowed, DelegationTokenAuthorizationFailed, DelegationTokenExpired, InvalidPrincipalType, NonEmptyGroup, GroupIdNotFound, FetchSessionIdNotFound, InvalidFetchSessionEpoch, ListenerNotFound, TopicDeletionDisabled, FencedLeaderEpoch, UnknownLeaderEpoch, UnsupportedCompressionType, StaleBrokerEpoch, OffsetNotAvailable, MemberIdRequired, PreferredLeaderNotAvailable, GroupMaxSizeReached, FencedInstanceId, EligibleLeadersNotAvailable, ElectionNotNeeded, NoReassignmentInProgress, GroupSubscribedToTopic, InvalidRecord, UnstableOffsetCommit, ThrottlingQuotaExceeded, ProducerFenced, ResourceNotFound, DuplicateResource, UnacceptableCredential, InconsistentVoterSet, InvalidUpdateVersion, FeatureUpdateFailed, PrincipalDeserializationFailure, // some variants omitted
}
Expand description

Native rdkafka error code.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

BadMessage

Received message is incorrect.

BadCompression

Bad/unknown compression.

BrokerDestroy

Broker is going away.

Fail

Generic failure.

BrokerTransportFailure

Broker transport failure.

CriticalSystemResource

Critical system resource.

Resolve

Failed to resolve broker.

MessageTimedOut

Produced message timed out.

PartitionEOF

Reached the end of the topic+partition queue on the broker. Not really an error.

UnknownPartition

Permanent: Partition does not exist in cluster.

FileSystem

File or filesystem error.

UnknownTopic

Permanent: Topic does not exist in cluster.

AllBrokersDown

All broker connections are down.

InvalidArgument

Invalid argument, or invalid configuration.

OperationTimedOut

Operation timed out.

QueueFull

Queue is full.

ISRInsufficient

ISR count < required.acks.

NodeUpdate

Broker node update.

SSL

SSL error.

WaitingForCoordinator

Waiting for coordinator to become available.

UnknownGroup

Unknown client group.

InProgress

Operation in progress.

PreviousInProgress

Previous operation in progress, wait for it to finish.

ExistingSubscription

This operation would interfere with an existing subscription.

AssignPartitions

Assigned partitions (rebalance_cb).

RevokePartitions

Revoked partitions (rebalance_cb).

Conflict

Conflicting use.

State

Wrong state.

UnknownProtocol

Unknown protocol.

NotImplemented

Not implemented.

Authentication

Authentication failure.

NoOffset

No stored offset.

Outdated

Outdated.

TimedOutQueue

Timed out in queue.

UnsupportedFeature

Feature not supported by broker.

WaitCache

Awaiting cache update.

Interrupted

Operation interrupted (e.g., due to yield).

KeySerialization

Key serialization error.

ValueSerialization

Value serialization error.

KeyDeserialization

Key deserialization error.

ValueDeserialization

Value deserialization error.

Partial

Partial response.

ReadOnly

Modification attempted on read-only object.

NoEnt

No such entry or item not found.

Underflow

Read underflow.

InvalidType

Invalid type.

Retry

Retry operation.

PurgeQueue

Purged in queue.

PurgeInflight

Purged in flight.

Fatal

Fatal error: see rd_kafka_fatal_error().

Inconsistent

Inconsistent state.

GaplessGuarantee

Gap-less ordering would not be guaranteed if proceeding.

PollExceeded

Maximum poll interval exceeded.

UnknownBroker

Unknown broker.

NotConfigured

Functionality not configured.

Fenced

Instance has been fenced.

Application

Application generated error.

AssignmentLost

Assignment lost.

Noop

No operation performed.

AutoOffsetReset

No offset to automatically reset to.

Unknown

Unknown broker error.

NoError

Success.

OffsetOutOfRange

Offset out of range.

InvalidMessage

Invalid message.

UnknownTopicOrPartition

Unknown topic or partition.

InvalidMessageSize

Invalid message size.

LeaderNotAvailable

Leader not available.

NotLeaderForPartition

Not leader for partition.

RequestTimedOut

Request timed out.

BrokerNotAvailable

Broker not available.

ReplicaNotAvailable

Replica not available.

MessageSizeTooLarge

Message size too large.

StaleControllerEpoch

Stale controller epoch code.

OffsetMetadataTooLarge

Offset metadata string too large.

NetworkException

Broker disconnected before response received.

CoordinatorLoadInProgress

Coordinator load in progress.

CoordinatorNotAvailable

Coordinator not available.

NotCoordinator

Not coordinator.

InvalidTopic

Invalid topic.

MessageBatchTooLarge

Message batch larger than configured server segment size.

NotEnoughReplicas

Not enough in-sync replicas.

NotEnoughReplicasAfterAppend

Message(s) written to insufficient number of in-sync replicas.

InvalidRequiredAcks

Invalid required acks value.

IllegalGeneration

Specified group generation id is not valid.

InconsistentGroupProtocol

Inconsistent group protocol.

InvalidGroupId

Invalid group.id.

UnknownMemberId

Unknown member.

InvalidSessionTimeout

Invalid session timeout.

RebalanceInProgress

Group rebalance in progress.

InvalidCommitOffsetSize

Commit offset data size is not valid.

TopicAuthorizationFailed

Topic authorization failed.

GroupAuthorizationFailed

Group authorization failed.

ClusterAuthorizationFailed

Cluster authorization failed.

InvalidTimestamp

Invalid timestamp.

UnsupportedSASLMechanism

Unsupported SASL mechanism.

IllegalSASLState

Illegal SASL state.

UnsupportedVersion

Unsupported version.

TopicAlreadyExists

Topic already exists.

InvalidPartitions

Invalid number of partitions.

InvalidReplicationFactor

Invalid replication factor.

InvalidReplicaAssignment

Invalid replica assignment.

InvalidConfig

Invalid config.

NotController

Not controller for cluster.

InvalidRequest

Invalid request.

UnsupportedForMessageFormat

Message format on broker does not support request.

PolicyViolation

Policy violation.

OutOfOrderSequenceNumber

Broker received an out of order sequence number.

DuplicateSequenceNumber

Broker received a duplicate sequence number.

InvalidProducerEpoch

Producer attempted an operation with an old epoch.

InvalidTransactionalState

Producer attempted a transactional operation in an invalid state.

InvalidProducerIdMapping

Producer attempted to use a producer id which is currently assigned to its transactional id.

InvalidTransactionTimeout

Transaction timeout is larger than the maxi value allowed by the broker’s max.transaction.timeout.ms.

ConcurrentTransactions

Producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing.

TransactionCoordinatorFenced

Indicates that the transaction coordinator sending a WriteTxnMarker is no longer the current coordinator for a given producer.

TransactionalIdAuthorizationFailed

Transactional Id authorization failed.

SecurityDisabled

Security features are disabled.

OperationNotAttempted

Operation not attempted.

KafkaStorageError

Disk error when trying to access log file on the disk.

LogDirNotFound

The user-specified log directory is not found in the broker config.

SaslAuthenticationFailed

SASL Authentication failed.

UnknownProducerId

Unknown Producer Id.

ReassignmentInProgress

Partition reassignment is in progress.

DelegationTokenAuthDisabled

Delegation Token feature is not enabled.

DelegationTokenNotFound

Delegation Token is not found on server.

DelegationTokenOwnerMismatch

Specified Principal is not valid Owner/Renewer.

DelegationTokenRequestNotAllowed

Delegation Token requests are not allowed on this connection.

DelegationTokenAuthorizationFailed

Delegation Token authorization failed.

DelegationTokenExpired

Delegation Token is expired.

InvalidPrincipalType

Supplied principalType is not supported.

NonEmptyGroup

The group is not empty.

GroupIdNotFound

The group id does not exist.

FetchSessionIdNotFound

The fetch session ID was not found.

InvalidFetchSessionEpoch

The fetch session epoch is invalid.

ListenerNotFound

No matching listener.

TopicDeletionDisabled

Topic deletion is disabled.

FencedLeaderEpoch

Leader epoch is older than broker epoch.

UnknownLeaderEpoch

Leader epoch is newer than broker epoch.

UnsupportedCompressionType

Unsupported compression type.

StaleBrokerEpoch

Broker epoch has changed.

OffsetNotAvailable

Leader high watermark is not caught up.

MemberIdRequired

Group member needs a valid member ID.

PreferredLeaderNotAvailable

Preferred leader was not available.

GroupMaxSizeReached

Consumer group has reached maximum size.

FencedInstanceId

Static consumer fenced by other consumer with same group.instance.id.

EligibleLeadersNotAvailable

Eligible partition leaders are not available.

ElectionNotNeeded

Leader election not needed for topic partition.

NoReassignmentInProgress

No partition reassignment is in progress.

GroupSubscribedToTopic

Deleting offsets of a topic while the consumer group is subscribed to it.

InvalidRecord

Broker failed to validate record.

UnstableOffsetCommit

There are unstable offsets that need to be cleared.

ThrottlingQuotaExceeded

Throttling quota has been exceeded.

ProducerFenced

There is a newer producer with the same transactional ID which fences the current one.

ResourceNotFound

Request illegally referred to resource that does not exist.

DuplicateResource

Request illegally referred to the same resource twice.

UnacceptableCredential

Requested credential would not meet criteria for acceptability.

InconsistentVoterSet

Either the sender or recipient of a voter-only request is not one of the expected voters.

InvalidUpdateVersion

Invalid update version.

FeatureUpdateFailed

Unable to update finalized features due to server error.

PrincipalDeserializationFailure

Request principal deserialization failed during forwarding.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.