Skip to main content

Module backend

Module backend 

Source
Expand description

Pluggable queue backend abstraction (v2). The bundled Queue keeps its in-process semantics; opt into a remote broker via backend::QueueBackend. Pluggable queue backend abstraction.

QueueBackend is the v2 trait that lets a Queue swap its in-process storage for an external broker (Redis, Postgres, NATS, …). The bundled MemoryBackend keeps the existing in-process Queue semantics behind the same trait so consumer code can move to the trait at its own pace.

Structs§

JobId
Job identifier returned by QueueBackend::push.
MemoryBackend
In-process backend keeping job state in a single Mutex<Vec<…>>. Drop-in replacement for the bundled Queue storage; suitable for tests and single-node deployments. Replace with a remote backend for multi-pod use.
PushOptions
Per-push options.
ReservedJob
Reserved job returned by QueueBackend::reserve.

Enums§

BackendError
Backend-level error.

Traits§

QueueBackend
Queue backend trait — async by design, since real backends are remote.