Skip to main content

QueueBackend

Trait QueueBackend 

Source
pub trait QueueBackend:
    Send
    + Sync
    + 'static {
    // Required method
    fn name(&self) -> &'static str;
}
Expand description

A queue backend, identified by name for boot diagnostics. The actual runtime work happens through JobProducer (enqueue) and JobConsumer (drain ProcessMethod and dispatch). A backend’s module typically:

  1. seeds an Arc<dyn JobProducer> in the container (so any service can inject it generically), and
  2. contributes a Transport whose serve runs the backend’s [JobConsumer] driver.

Required Methods§

Source

fn name(&self) -> &'static str

Stable display name (e.g. "apalis-redis", "sqs", "in-memory"). Logged at boot when the consumer attaches.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§