# antirez/disque

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/antirez-disque).**

8,070 stars · 535 forks · C · BSD-3-Clause

## Links

- GitHub: https://github.com/antirez/disque
- awesome-repositories: https://awesome-repositories.com/repository/antirez-disque.md

## Description

Disque is a distributed message broker that manages asynchronous communication between services through in-memory job queues. It operates as a cluster-aware job scheduler, providing at-least-once delivery guarantees with acknowledgment and retry mechanisms, and supports blocking queue consumers that efficiently wait for jobs to become available.

The broker implements a job state machine that tracks each job through its lifecycle from queued to acknowledged, with configurable retry limits and time-to-live expiration to prevent unbounded queue growth. Jobs can be enqueued with delivery guarantees, fetched via blocking or non-blocking calls, acknowledged upon completion, and rejected for reprocessing. The system supports extending job processing time to prevent premature redelivery, and queue operations can be paused and resumed with cluster-wide broadcast for coordinated maintenance.

Disque uses an asynchronous replication model where jobs are replicated to slave nodes without waiting for confirmation, prioritizing low latency over strong consistency. Nodes coordinate through a gossip-based protocol for peer discovery and state propagation without a central coordinator. All job data resides in memory for fast access, with optional persistence to disk for recovery after restarts. The broker provides queue and job state inspection capabilities, allowing operators to view queue length, job age, blocked clients, and individual job details.

## Tags

### Networking & Communication

- [At-Least-Once Delivery Guarantees](https://awesome-repositories.com/f/networking-communication/message-delivery-guarantees/at-least-once-delivery-guarantees.md) — Ensures every job is processed at least once using acknowledgments and redelivery.
- [Message Brokers](https://awesome-repositories.com/f/networking-communication/message-brokers.md) — Manages asynchronous communication between services through in-memory job queues.
- [Enqueue Operations](https://awesome-repositories.com/f/networking-communication/message-delivery-guarantees/at-least-once-delivery-guarantees/enqueue-operations.md) — Adds messages to queues with configurable replication, delay, retry, and time-to-live settings. ([source](https://cdn.jsdelivr.net/gh/antirez/disque@master/README.md))

### Data & Databases

- [In-Memory Queues](https://awesome-repositories.com/f/data-databases/in-memory-data-stores/in-memory-queues.md) — Stores all job data in memory for fast access with optional disk persistence.
- [Asynchronous Replication Management](https://awesome-repositories.com/f/data-databases/primary-replica-replication/asynchronous-replication-management.md) — Implements asynchronous replication where master acknowledges writes before all replicas confirm.
- [Inspections](https://awesome-repositories.com/f/data-databases/persistent-application-state/job-state-persistence/inspections.md) — Provides queue and job state inspection for viewing length, age, blocked clients, and job details.

### Development Tools & Productivity

- [Lifecycle State Machines](https://awesome-repositories.com/f/development-tools-productivity/change-tracking/state-tracking-utilities/action-based-state-tracking/job-state-tracking/lifecycle-state-machines.md) — Implements a job state machine tracking each job through its lifecycle from queued to acknowledged.

### DevOps & Infrastructure

- [Retry and TTL Configurations](https://awesome-repositories.com/f/devops-infrastructure/ansible-automation-platforms/job-queues/retry-and-ttl-configurations.md) — Adds jobs to queues with configurable retry limits, time-to-live, and delivery delays.
- [Gossip Protocols](https://awesome-repositories.com/f/devops-infrastructure/cluster-coordination/gossip-protocols.md) — Uses gossip-based protocol for peer discovery and state propagation across the cluster.
- [Message Brokers](https://awesome-repositories.com/f/devops-infrastructure/cluster-job-schedulers/message-brokers.md) — Distributes jobs across multiple nodes in a cluster for fault-tolerant message processing.
- [Queue Pause and Resume Controls](https://awesome-repositories.com/f/devops-infrastructure/deployment-strategies/pause-and-resume-strategies/task-pause-and-resume-controls/queue-pause-and-resume-controls.md) — Provides queue pause and resume controls with cluster-wide broadcast for coordinated maintenance. ([source](https://cdn.jsdelivr.net/gh/antirez/disque@master/README.md))
- [Acknowledgments](https://awesome-repositories.com/f/devops-infrastructure/job-queues/completed-job-cleanups/acknowledgments.md) — Signals successful job completion to remove it from the queue and prevent redelivery. ([source](https://cdn.jsdelivr.net/gh/antirez/disque@master/README.md))
- [Job Expirations](https://awesome-repositories.com/f/devops-infrastructure/job-queues/job-expirations.md) — Automatically evicts jobs after configurable time-to-live to prevent unbounded queue growth.
- [Processing Time Extensions](https://awesome-repositories.com/f/devops-infrastructure/job-queues/job-expirations/processing-time-extensions.md) — Provides a mechanism for workers to extend job processing time, preventing premature redelivery. ([source](https://cdn.jsdelivr.net/gh/antirez/disque@master/README.md))
- [Job Rejections and Requeues](https://awesome-repositories.com/f/devops-infrastructure/job-queues/job-rejections-and-requeues.md) — Implements job rejection with automatic requeue and retry counter for at-least-once delivery. ([source](https://cdn.jsdelivr.net/gh/antirez/disque@master/README.md))
- [Manual Job Fetching](https://awesome-repositories.com/f/devops-infrastructure/job-queues/manual-job-fetching.md) — Ships a blocking and non-blocking job fetch capability for retrieving jobs from queues. ([source](https://cdn.jsdelivr.net/gh/antirez/disque@master/README.md))
- [Blocking Fetches](https://awesome-repositories.com/f/devops-infrastructure/job-queues/manual-job-fetching/blocking-fetches.md) — Provides blocking job fetch that waits until a job is available or a timeout expires.
- [Blocking Consumers](https://awesome-repositories.com/f/devops-infrastructure/message-queues/single-producer-single-consumer-queues/blocking-consumers.md) — Provides blocking queue consumers that efficiently wait for jobs without polling overhead.
- [Queue and Job State Inspections](https://awesome-repositories.com/f/devops-infrastructure/job-queues/queue-and-job-state-inspections.md) — Offers inspection commands for queue length, job age, blocked clients, and individual job details. ([source](https://cdn.jsdelivr.net/gh/antirez/disque@master/README.md))

### Operating Systems & Systems Programming

- [Queue Consumers](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/process-queue-managers/wait-queue-blocking/queue-consumers.md) — Provides blocking queue consumers that efficiently wait for jobs without busy-waiting.

### System Administration & Monitoring

- [Retry Counters](https://awesome-repositories.com/f/system-administration-monitoring/job-monitoring-tools/failed-processing-job-auditing/retry-counters.md) — Tracks retry counts on rejection to limit redeliveries and discard repeatedly failing jobs.
