pub enum ProducerError {
Show 23 variants
IdempotenceRequiresAcksAll,
IdempotenceRequiresRetries,
TransactionalRequiresAcksAll,
MissingTransactionVersionFeature,
UnsupportedTransactionVersion {
level: i16,
},
UnsupportedApiVersion {
api: &'static str,
min_version: i16,
broker_version: i16,
},
NotTransactional,
TopicHasNoPartitions {
topic: String,
},
MissingPartitionMetadata {
topic: String,
},
MetadataTimeout {
topic: String,
max_block_ms: u128,
},
TransactionManagerUnavailable {
operation: &'static str,
},
TransactionalProducerNotInitialized {
operation: &'static str,
},
TransactionCoordinatorConnectionMissing,
AttemptsExhausted {
operation: &'static str,
resource: String,
attempts: usize,
},
BatchFailed {
topic: String,
partition: i32,
message: String,
},
RecordTooLarge {
size: usize,
limit_name: &'static str,
limit: usize,
},
RequestTooLarge {
size: usize,
limit: usize,
},
BufferExhausted {
buffered: usize,
required: usize,
limit: usize,
max_block_ms: u128,
},
TransactionAbortRequired {
operation: &'static str,
message: String,
},
TransactionFatal {
operation: &'static str,
message: String,
},
RuntimeStoppedBefore {
operation: &'static str,
},
RuntimeStoppedDuring {
operation: &'static str,
},
Join(JoinError),
}Expand description
Errors raised by the producer API.
Variants§
IdempotenceRequiresAcksAll
Idempotence was enabled without acks=-1.
IdempotenceRequiresRetries
Idempotence was enabled without retries.
TransactionalRequiresAcksAll
Transactions require all replicas to acknowledge records.
MissingTransactionVersionFeature
The broker did not report the transaction feature level.
UnsupportedTransactionVersion
The broker transaction feature level is too old.
UnsupportedApiVersion
A broker API version is older than this client needs.
Fields
NotTransactional
The operation requires a configured transactional id.
TopicHasNoPartitions
Metadata reported no partitions for the topic.
MissingPartitionMetadata
Metadata did not include partition data for a topic.
MetadataTimeout
Metadata was not available before max_block elapsed.
The transaction manager unexpectedly disappeared.
TransactionalProducerNotInitialized
A transactional producer id was needed but had not been initialized.
TransactionCoordinatorConnectionMissing
A coordinator connection was needed but had not been opened.
AttemptsExhausted
A producer coordinator request exhausted all attempts.
Fields
BatchFailed
A produce batch failed before the broker accepted it.
RecordTooLarge
A record is too large for the configured producer limits.
Fields
RequestTooLarge
A Produce request is too large for the configured producer limits.
BufferExhausted
The accumulator did not have room for a record before max_block elapsed.
Fields
TransactionAbortRequired
A transactional operation failed and the open transaction must be aborted.
TransactionFatal
A transactional operation failed and the producer is no longer usable.
RuntimeStoppedBefore
The sender task stopped before the operation was sent.
RuntimeStoppedDuring
The sender task stopped while the operation was waiting for a reply.
Join(JoinError)
The sender task could not be joined.
Trait Implementations§
Source§impl Debug for ProducerError
impl Debug for ProducerError
Source§impl Display for ProducerError
impl Display for ProducerError
Source§impl Error for ProducerError
impl Error for ProducerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()