pub struct ConsumerRetriableCommitFailedError { /* private fields */ }Expand description
An offset commit failed with a retriable error; committing the latest consumed offsets again may succeed.
Corresponds to Java’s RetriableCommitFailedException. It has no entry in
Errors, so it carries no protocol code.
Java extends chain:
RetriableCommitFailedException -> RetriableException ->
ApiException -> KafkaException
Being its own class is what makes it retriable. The previous mapping routed
it through Errors::RequestTimedOut
solely to borrow that code’s retriability, which also made it
indistinguishable from a real TimeoutException.
Note the contrast with its sibling
ConsumerCommitFailedError, which extends
KafkaException directly and so is neither retriable nor an ApiException.
Implementations§
Source§impl ConsumerRetriableCommitFailedError
impl ConsumerRetriableCommitFailedError
Sourcepub const CONSUMER_RETRIABLE_COMMIT_FAILED_DEFAULT_MESSAGE: &str = "Offset commit failed with a retriable error. You should retry committing the latest consumed offsets."
pub const CONSUMER_RETRIABLE_COMMIT_FAILED_DEFAULT_MESSAGE: &str = "Offset commit failed with a retriable error. You should retry committing the latest consumed offsets."
Default message for RetriableCommitFailedException(Throwable), reworded.
Java’s text is “Offset commit failed with a retriable exception. You
should retry committing the latest consumed offsets.”
(RetriableCommitFailedException.java:26). CLAUDE.md §2 bars the word
“exception” from Rust code including message text, so this says “error”
instead. The two strings differ by that one word and nothing else.
Sourcepub fn new(message: impl Into<String>) -> Self
pub fn new(message: impl Into<String>) -> Self
Create the error with the given message —
RetriableCommitFailedException(String).
Sourcepub fn with_default_message() -> Self
pub fn with_default_message() -> Self
Create the error with Java’s default message.
Sourcepub fn with_source(source: Error) -> Self
pub fn with_source(source: Error) -> Self
RetriableCommitFailedException(Throwable t) — uses the default message.
The cause is retained and readable through Self::source /
Error::source, matching Java’s getCause().
Trait Implementations§
Source§impl Clone for ConsumerRetriableCommitFailedError
impl Clone for ConsumerRetriableCommitFailedError
Source§fn clone(&self) -> ConsumerRetriableCommitFailedError
fn clone(&self) -> ConsumerRetriableCommitFailedError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more