//! Error types for the message queue consumer use thiserror::Error; /// Errors that can occur during consumer operations #[derive(Debug, Error)] pub enum ConsumerError { #[error("Connection failed: {0}")] ConnectionFailed(String), #[error("Channel creation failed: {0}")] ChannelCreationFailed(String), #[error("QoS configuration failed: {0}")] QoSFailed(String), #[error("Not connected to broker")] NotConnected, #[error("Failed to start consuming: {0}")] ConsumeFailed(String), #[error("Failed to receive message: {0}")] ReceiveFailed(String), #[error("Configuration error: {0}")] ConfigError(String), #[error("Processing error: {0}")] ProcessingError(String), #[error("Timeout waiting for operation")] Timeout, #[error("TLS error: {0}")] TlsError(String), #[error("Pool exhausted: no available connections")] PoolExhausted, }