use thiserror::Error;
#[derive(Debug, Error)]
pub enum DlqError {
#[error("file DLQ I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("DLQ serialisation error: {0}")]
Serialization(String),
#[error("file DLQ error: {0}")]
File(String),
#[cfg(feature = "dlq-kafka")]
#[error("kafka DLQ error: {0}")]
Kafka(String),
#[error("DLQ backend error: {0}")]
BackendError(String),
#[error("all DLQ backends failed: {0}")]
AllBackendsFailed(String),
#[error("DLQ not configured")]
NotConfigured,
#[error("DLQ queue is full")]
QueueFull,
#[error("DLQ has shut down")]
Closed,
}