[][src]Enum kafka::error::KafkaCode

pub enum KafkaCode {
    Unknown,
    OffsetOutOfRange,
    CorruptMessage,
    UnknownTopicOrPartition,
    InvalidMessageSize,
    LeaderNotAvailable,
    NotLeaderForPartition,
    RequestTimedOut,
    BrokerNotAvailable,
    ReplicaNotAvailable,
    MessageSizeTooLarge,
    StaleControllerEpoch,
    OffsetMetadataTooLarge,
    NetworkException,
    GroupLoadInProgress,
    GroupCoordinatorNotAvailable,
    NotCoordinatorForGroup,
    InvalidTopic,
    RecordListTooLarge,
    NotEnoughReplicas,
    NotEnoughReplicasAfterAppend,
    InvalidRequiredAcks,
    IllegalGeneration,
    InconsistentGroupProtocol,
    InvalidGroupId,
    UnknownMemberId,
    InvalidSessionTimeout,
    RebalanceInProgress,
    InvalidCommitOffsetSize,
    TopicAuthorizationFailed,
    GroupAuthorizationFailed,
    ClusterAuthorizationFailed,
    InvalidTimestamp,
    UnsupportedSaslMechanism,
    IllegalSaslState,
    UnsupportedVersion,
}

Various errors reported by a remote Kafka server. See also Kafka Errors

Variants

Unknown

An unexpected server error

OffsetOutOfRange

The requested offset is outside the range of offsets maintained by the server for the given topic/partition

CorruptMessage

This indicates that a message contents does not match its CRC

UnknownTopicOrPartition

This request is for a topic or partition that does not exist on this broker.

InvalidMessageSize

The message has a negative size

LeaderNotAvailable

This error is thrown if we are in the middle of a leadership election and there is currently no leader for this partition and hence it is unavailable for writes.

NotLeaderForPartition

This error is thrown if the client attempts to send messages to a replica that is not the leader for some partition. It indicates that the clients metadata is out of date.

RequestTimedOut

This error is thrown if the request exceeds the user-specified time limit in the request.

BrokerNotAvailable

This is not a client facing error and is used mostly by tools when a broker is not alive.

ReplicaNotAvailable

If replica is expected on a broker, but is not (this can be safely ignored).

MessageSizeTooLarge

The server has a configurable maximum message size to avoid unbounded memory allocation. This error is thrown if the client attempt to produce a message larger than this maximum.

StaleControllerEpoch

Internal error code for broker-to-broker communication.

OffsetMetadataTooLarge

If you specify a string larger than configured maximum for offset metadata

NetworkException

The server disconnected before a response was received.

GroupLoadInProgress

The broker returns this error code for an offset fetch request if it is still loading offsets (after a leader change for that offsets topic partition), or in response to group membership requests (such as heartbeats) when group metadata is being loaded by the coordinator.

GroupCoordinatorNotAvailable

The broker returns this error code for group coordinator requests, offset commits, and most group management requests if the offsets topic has not yet been created, or if the group coordinator is not active.

NotCoordinatorForGroup

The broker returns this error code if it receives an offset fetch or commit request for a group that it is not a coordinator for.

InvalidTopic

For a request which attempts to access an invalid topic (e.g. one which has an illegal name), or if an attempt is made to write to an internal topic (such as the consumer offsets topic).

RecordListTooLarge

If a message batch in a produce request exceeds the maximum configured segment size.

NotEnoughReplicas

Returned from a produce request when the number of in-sync replicas is lower than the configured minimum and requiredAcks is -1.

NotEnoughReplicasAfterAppend

Returned from a produce request when the message was written to the log, but with fewer in-sync replicas than required.

InvalidRequiredAcks

Returned from a produce request if the requested requiredAcks is invalid (anything other than -1, 1, or 0).

IllegalGeneration

Returned from group membership requests (such as heartbeats) when the generation id provided in the request is not the current generation.

InconsistentGroupProtocol

Returned in join group when the member provides a protocol type or set of protocols which is not compatible with the current group.

InvalidGroupId

Returned in join group when the groupId is empty or null.

UnknownMemberId

Returned from group requests (offset commits/fetches, heartbeats, etc) when the memberId is not in the current generation.

InvalidSessionTimeout

Return in join group when the requested session timeout is outside of the allowed range on the broker

RebalanceInProgress

Returned in heartbeat requests when the coordinator has begun rebalancing the group. This indicates to the client that it should rejoin the group.

InvalidCommitOffsetSize

This error indicates that an offset commit was rejected because of oversize metadata.

TopicAuthorizationFailed

Returned by the broker when the client is not authorized to access the requested topic.

GroupAuthorizationFailed

Returned by the broker when the client is not authorized to access a particular groupId.

ClusterAuthorizationFailed

Returned by the broker when the client is not authorized to use an inter-broker or administrative API.

InvalidTimestamp

The timestamp of the message is out of acceptable range.

UnsupportedSaslMechanism

The broker does not support the requested SASL mechanism.

IllegalSaslState

Request is not valid given the current SASL state.

UnsupportedVersion

The version of API is not supported.

Trait Implementations

impl Eq for KafkaCode[src]

impl Clone for KafkaCode[src]

impl PartialEq<KafkaCode> for KafkaCode[src]

impl Copy for KafkaCode[src]

impl Debug for KafkaCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,