pub struct QueueConfig {
pub initial_delay: String,
pub max_delay: String,
pub backoff_multiplier: f64,
pub max_attempts: u32,
pub worker_threads: usize,
pub batch_size: usize,
}Expand description
Outbound mail queue and retry configuration.
Fields§
§initial_delay: StringRequired. Initial retry delay after the first failed delivery attempt,
expressed as a human-readable duration (e.g. "60s", "1m").
max_delay: StringRequired. Maximum retry delay after many consecutive failures,
expressed as a human-readable duration (e.g. "3600s", "1h").
backoff_multiplier: f64Required. Exponential back-off multiplier applied between retries.
Must be positive. A value of 2.0 doubles the delay after each
failure up to max_delay.
max_attempts: u32Required. Maximum number of delivery attempts before the message is bounced back to the sender.
worker_threads: usizeRequired. Number of threads in the queue worker pool. Must be > 0.
batch_size: usizeRequired. Maximum number of messages to dequeue and attempt in a single batch. Larger values increase throughput at the cost of latency.
Implementations§
Source§impl QueueConfig
impl QueueConfig
Sourcepub fn initial_delay_seconds(&self) -> Result<u64>
pub fn initial_delay_seconds(&self) -> Result<u64>
Parse initial delay to seconds.
Sourcepub fn max_delay_seconds(&self) -> Result<u64>
pub fn max_delay_seconds(&self) -> Result<u64>
Parse max delay to seconds.
Sourcepub fn validate_backoff_multiplier(&self) -> Result<()>
pub fn validate_backoff_multiplier(&self) -> Result<()>
Validate backoff multiplier.
Sourcepub fn validate_worker_threads(&self) -> Result<()>
pub fn validate_worker_threads(&self) -> Result<()>
Validate worker threads.
Trait Implementations§
Source§impl Clone for QueueConfig
impl Clone for QueueConfig
Source§fn clone(&self) -> QueueConfig
fn clone(&self) -> QueueConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more