Skip to main content

Crate mytheclipse_queue

Crate mytheclipse_queue 

Source
Expand description

§mytheclipse-queue

A unified job queue abstraction so your background work isn’t locked to one transport. Provides a single Queue trait, Job type, and WorkerPool executor with configurable retry/backoff, concurrency, and a dead-letter queue — behind pluggable backends:

  • In-memory (default) — tokio::sync::mpsc + task spawning, no external service.
  • Redis (redis) — LIST-based queue with atomic moves.
  • NATS JetStream (nats) — durable consumer with ACK/NACK.
  • PostgreSQL (postgres) — SKIP LOCKED polling.

Re-exports§

pub use backpressure_enqueue::enqueue_with_backpressure;
pub use backpressure_enqueue::BackpressureEnforcer;
pub use backpressure_enqueue::BackpressureError;
pub use rate_limited::RateLimitQueueError;
pub use rate_limited::RateLimitedQueue;
pub use worker_rate_limited::RateLimitedWorkerPool;
pub use pipeline::Stage;
pub use pipeline::StageError;
pub use pipeline::StageRunner;

Modules§

backpressure_enqueue
Backpressure-aware enqueuer (in-memory backend).
batch
Batch job processor for bulk processing of queued jobs.
error
Errors returned by queue and job operations.
in_memory
In-process job queue using tokio::sync::Mutex + Notify.
job
The Job type and its metadata.
pipeline
Streaming pipeline that chains async transform stages with backpressure.
rate_limited
Rate-limited queue wrapper.
traits
The core Queue trait and supporting types.
worker
Worker pool for processing queued jobs with retry, backoff, and graceful shutdown.
worker_rate_limited
Rate-limited worker pool (feature in-memory).