Skip to main content

Crate blazingly_queue

Crate blazingly_queue 

Source
Expand description

Runtime-neutral queue seam with an in-memory conformance adapter.

This crate defines contracts only and stays dependency free. Vendor adapters for NATS, RabbitMQ, Kafka, and SQS live in separate adapter packages outside this repository and implement Queue there. MemoryQueue exists for tests and local development, and Worker supplies the retry, backoff, and dead-letter policy every adapter shares.

The seam is deliberately cross-thread. QueueFuture carries a Send bound and Queue requires Send + Sync so a Worker can run on a multi-threaded pool next to the thread-per-core HTTP path. Operation handlers stay unaffected: a Send future is usable from the framework’s thread-local executor, so publishing from a handler still compiles. An adapter that can only run on one thread must own that thread internally and hand back a Send future.

Structs§

Delivery
One at-least-once delivery.
JobError
Failure returned by a worker job handler.
MemoryQueue
Deterministic in-memory adapter for tests and local development.
Message
Queue payload shared by vendor adapters.
QueueClient
Cloneable DI wrapper that keeps application code vendor-neutral.
RetryPolicy
Bounded exponential backoff applied between delivery attempts.
Worker
Runtime-neutral consumer loop over one Queue topic.

Enums§

DeadLetter
Destination for deliveries that exhausted their attempts.
QueueError
WorkerStep
Outcome of one Worker::step cycle.

Constants§

DEAD_LETTER_ATTEMPT_HEADER
Header carrying the attempt count of a dead-lettered delivery.
DEAD_LETTER_REASON_HEADER
Header carrying the last handler failure of a dead-lettered delivery.
DEAD_LETTER_SOURCE_HEADER
Header naming the topic a dead-lettered delivery came from.

Traits§

Queue
Adapter surface implemented by NATS, RabbitMQ, Kafka, SQS, and test queues.

Type Aliases§

QueueFuture