pub struct DelivererConfig {Show 15 fields
pub queue: String,
pub retry: RetryPolicy,
pub batch: usize,
pub lease: Duration,
pub concurrency: usize,
pub per_host: usize,
pub first_scheme: Scheme,
pub idle_poll: Duration,
pub shared_limit: Option<Arc<Semaphore>>,
pub priority: Option<Priority>,
pub breaker: Option<CircuitBreaker>,
pub permanent: fn(u16) -> bool,
pub low_priority: Option<String>,
pub permanent_if_sender_gone: fn(u16) -> bool,
pub wait_as_asked: bool,
}Expand description
How the delivery loop behaves.
Fields§
§queue: StringThe queue deliveries wait in, within the backend.
retry: RetryPolicy§batch: usizeHow many deliveries one claim takes.
lease: DurationHow long a claimed delivery is held before another worker may take it.
concurrency: usizeDeliveries in flight at once, in all.
per_host: usizeDeliveries in flight at once to one host.
first_scheme: SchemeThe scheme a host is tried in until it has accepted one.
idle_poll: DurationThe longest the loop sleeps with nothing due, so that deliveries queued by another process are picked up. Each sleep is up to a quarter shorter, at random, so that the loops of many servers in one process do not all wake at once.
A limit on deliveries in flight shared with other deliverers, such as every tenant’s in a process that serves several; a delivery holds one of its permits while it is being sent.
priority: Option<Priority>A lane for sends to few inboxes — a direct message, a reply, a follow — whose deliveries take free slots before any other’s.
Deliveries are otherwise sent in the order they were queued, so a message to one person queued just after a post to thousands of servers waits for every one of those: two and a half minutes behind three posts to 9,258 servers. Off unless given.
breaker: Option<CircuitBreaker>Holding back deliveries to a destination that keeps failing. On by
default; None sends every delivery whatever came of the last.
permanent: fn(u16) -> boolWhich statuses an inbox answers with say that trying again cannot
help, so that the delivery is given up on at once:
permanent_status unless given.
low_priority: Option<String>A lane for what can wait — Batch::low_priority — claimed only once
the other queues have nothing due, as Sidekiq’s lighter queues are.
Off unless given; without it such a batch waits in queue.
permanent_if_sender_gone: fn(u16) -> boolWhich statuses also say so when the sender is gone, by
SenderKeys::gone: none unless given.
wait_as_asked: boolWhether a retry waits at least as long as the inbox asked with
Retry-After, and a delivery the circuit breaker held at least until
its cool-off ends, rather than only what the retry policy says. On
unless turned off; Mastodon, for one, retries on its schedule alone.
Trait Implementations§
Source§impl Clone for DelivererConfig
impl Clone for DelivererConfig
Source§fn clone(&self) -> DelivererConfig
fn clone(&self) -> DelivererConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more