Expand description
venturi is a durable, PostgreSQL-backed job queue for Rust.
Work is modelled as a task::Task: a plain serializable struct that is both
the payload and the identity of a job. Producers enqueue tasks through a
queue::Queue handle; workers claim, run, and settle them through a
worker::Worker that dispatches each job back to its task::Handler.
The crate is layered so each layer is usable on its own: storage sits behind
the store::Store backend trait, the worker drives the claim/dispatch loop,
and the task layer defines the authoring surface. The default storage adapter
(behind the postgres feature) is built on tokio-postgres, deadpool, and
refinery.
See the getting-started guide in docs/guide.md for a walkthrough from first
steps to advanced usage.
Re-exports§
pub use backoff::Backoff;pub use context::Context;pub use context::JournalEntry;pub use error::Error;pub use outcome::Outcome;pub use outcome::TaskError;pub use queue::Queue;pub use task::DedupKey;pub use task::Handler;pub use task::Merge;pub use task::Pending;pub use task::Priority;pub use task::Task;pub use worker::PanicPolicy;pub use worker::Worker;pub use worker::WorkerBuilder;
Modules§
- backoff
- Retry backoff: configuration, the Fibonacci curve, and deterministic jitter.
- context
- The per-run execution
Contexthanded to a handler, and theJournalEntryview it exposes over prior runs. - error
- Public error types for venturi’s queue and storage operations.
- outcome
- What a single execution of a handler concludes: an
Outcomeon success or aTaskErroron failure. - postgres
- The default PostgreSQL storage adapter.
- queue
- The producer-side queue handle.
- store
- The storage backend contract (ADR 8) and its type-erased value types.
- task
- The task-authoring surface: the
TaskandHandlertraits a consuming project implements, plus the small value types they use. - worker
- The worker: a bounded claim-and-dispatch loop over a
Store.