1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! Core abstractions for `queuey`.
//!
//! This crate is transport-agnostic. It defines:
//!
//! * [`QueueSet`]: implemented (usually via `#[derive(Queues)]`) by an enum whose
//! variants are the queues of an application.
//! * [`Job`]: implemented (usually via `#[derive(Job)]`) by a serializable payload
//! type. A job statically knows which queue (variant) it belongs to.
//! * [`JobHandler`]: user code that processes one job type.
//! * [`Backend`]: a message transport (RabbitMQ, in-memory, ...).
//! * [`Producer`] / [`Worker`]: the runtime that ties everything together.
//! * [`RetryPolicy`] / [`Backoff`]: optional (exponential) retry configuration.
//! * Deferral: a handler returns [`JobError::Deferred`] (or a producer calls
//! [`Producer::defer`]) to park a job for an exact delay and have it come back
//! *ahead* of the backlog, at [`QueueConfig::max_priority`], without spending an
//! attempt. The motivating case is an API answering `429` with `Retry-After`.
//!
//! Module structure and public API below is the *contract* shared by the macro crate
//! and the backend crates. Keep signatures stable; extend rather than change.
pub
pub use ;
pub use Envelope;
pub use ;
pub use ;
pub use Job;
pub use MemoryBackend;
pub use Producer;
pub use ;
pub use ;
pub use ;
/// Re-exports needed by generated code from `queuey-macros`.
/// Not part of the stable public API.