queuey-core 0.2.0

Core traits, worker runtime and retry policies for queuey
Documentation

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.