Skip to main content

Module queue

Module queue 

Source
Expand description

Durable / async job execution.

Plugins (and the runtime) implement tower::Service<JobRequest, Response = JobResponse> for queue handlers. The queue!() macro emits these Service impls; the worker pool composes them with tower::retry::Retry, tower::timeout::Timeout, and tower::limit::concurrency to get retry / deadline / pool-size semantics for free.

The runtime calls service.ready().await?.call(req).await per claimed job, with the journal-backed input as req.payload.

Structs§

JobRequest
Input to a queue handler. The queue field names the queue the job came from (also the macro’s name); payload is the journaled JSON-shaped input the handler will operate on.
JobResponse
Outcome of a single job handler invocation.

Enums§

JobStatus
Terminal status of a job execution.