pub enum ClientError {
Show 14 variants
BrokerError(BrokerRequestError),
EncodingError(String),
MalformedResponse,
NoPartitionsAvailable(String),
ProducerMessagesEmpty,
UnknownTopic(String),
UnknownPartition(String, i32),
NoPartitionLeader(String, i32),
ResponseError(i16, Option<ResponseError>, Option<StrBytes>),
ClusterMetadataTimeout,
NoBrokerFound,
Other(String),
NoTopicsSpecified,
NoControllerFound,
}
Expand description
Client errors from interacting with a Kafka cluster.
TODO: probably just refactor this into an opaque Retryable and Fatal errors, which just dump info on debug.
Variants§
BrokerError(BrokerRequestError)
Error while interacting with a broker.
EncodingError(String)
Error while encoding a batch of records.
MalformedResponse
The broker returned a malformed response.
NoPartitionsAvailable(String)
The specified topic has no available partitions.
ProducerMessagesEmpty
Produce requests must include at least 1 record.
UnknownTopic(String)
The specified topic is unknown to the cluster.
UnknownPartition(String, i32)
The specified topic partition is unknown to the cluster.
NoPartitionLeader(String, i32)
The specified topic partition is does not currently have a known leader.
ResponseError(i16, Option<ResponseError>, Option<StrBytes>)
An error was returned in a response from a broker.
ClusterMetadataTimeout
Timeout while waiting for cluster metadata to bootstrap.
NoBrokerFound
Could not find a broker specified by ID, or any broker at all.
Other(String)
NoTopicsSpecified
NoControllerFound
Trait Implementations§
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl !Freeze for ClientError
impl RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnwindSafe for ClientError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more