kafka::error

Enum KafkaCode

Source
pub enum KafkaCode {
Show 36 variants Unknown = -1, OffsetOutOfRange = 1, CorruptMessage = 2, UnknownTopicOrPartition = 3, InvalidMessageSize = 4, LeaderNotAvailable = 5, NotLeaderForPartition = 6, RequestTimedOut = 7, BrokerNotAvailable = 8, ReplicaNotAvailable = 9, MessageSizeTooLarge = 10, StaleControllerEpoch = 11, OffsetMetadataTooLarge = 12, NetworkException = 13, GroupLoadInProgress = 14, GroupCoordinatorNotAvailable = 15, NotCoordinatorForGroup = 16, InvalidTopic = 17, RecordListTooLarge = 18, NotEnoughReplicas = 19, NotEnoughReplicasAfterAppend = 20, InvalidRequiredAcks = 21, IllegalGeneration = 22, InconsistentGroupProtocol = 23, InvalidGroupId = 24, UnknownMemberId = 25, InvalidSessionTimeout = 26, RebalanceInProgress = 27, InvalidCommitOffsetSize = 28, TopicAuthorizationFailed = 29, GroupAuthorizationFailed = 30, ClusterAuthorizationFailed = 31, InvalidTimestamp = 32, UnsupportedSaslMechanism = 33, IllegalSaslState = 34, UnsupportedVersion = 35,
}
Expand description

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

Variants§

§

Unknown = -1

An unexpected server error

§

OffsetOutOfRange = 1

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

§

CorruptMessage = 2

This indicates that a message contents does not match its CRC

§

UnknownTopicOrPartition = 3

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

§

InvalidMessageSize = 4

The message has a negative size

§

LeaderNotAvailable = 5

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 = 6

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 = 7

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

§

BrokerNotAvailable = 8

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

§

ReplicaNotAvailable = 9

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

§

MessageSizeTooLarge = 10

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 = 11

Internal error code for broker-to-broker communication.

§

OffsetMetadataTooLarge = 12

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

§

NetworkException = 13

The server disconnected before a response was received.

§

GroupLoadInProgress = 14

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 = 15

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 = 16

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 = 17

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 = 18

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

§

NotEnoughReplicas = 19

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

§

NotEnoughReplicasAfterAppend = 20

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

§

InvalidRequiredAcks = 21

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

§

IllegalGeneration = 22

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

§

InconsistentGroupProtocol = 23

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

§

InvalidGroupId = 24

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

§

UnknownMemberId = 25

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

§

InvalidSessionTimeout = 26

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

§

RebalanceInProgress = 27

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

§

InvalidCommitOffsetSize = 28

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

§

TopicAuthorizationFailed = 29

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

§

GroupAuthorizationFailed = 30

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

§

ClusterAuthorizationFailed = 31

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

§

InvalidTimestamp = 32

The timestamp of the message is out of acceptable range.

§

UnsupportedSaslMechanism = 33

The broker does not support the requested SASL mechanism.

§

IllegalSaslState = 34

Request is not valid given the current SASL state.

§

UnsupportedVersion = 35

The version of API is not supported.

Trait Implementations§

Source§

impl Clone for KafkaCode

Source§

fn clone(&self) -> KafkaCode

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KafkaCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for KafkaCode

Source§

fn eq(&self, other: &KafkaCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for KafkaCode

Source§

impl Eq for KafkaCode

Source§

impl StructuralPartialEq for KafkaCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more