Redis-backed, header-only task queue with worker orchestration, scheduling, automatic retries, and a complete tooling ecosystem. Drop one header, link two libraries, and start processing.
Production-ready primitives for building reliable distributed systems in C++.
Tasks are guaranteed to execute at least once with automatic retry tracking. Failed tasks are re-enqueued with configurable retry limits.
Enqueue tasks for future execution with precise time-based scheduling using standard C++ chrono. Cron support planned.
Crashed workers don't lose tasks. Recovery logic automatically returns stuck tasks to the pending queue after configurable timeouts.
Multiple named queues with configurable priority weights. Workers poll higher-priority queues more frequently, ensuring critical tasks run first.
Drop a single cppq.hpp file into your project. No build system integration needed. Just include, link, and go.
All Redis operations use server-side Lua scripts for atomic, race-condition-free task state transitions. No data loss under concurrency.
Get a distributed task queue running in under 30 lines of code.
cppq's API is designed to feel natural in modern C++ codebases. Define a handler, enqueue tasks, and let the server do the rest.
runServer with queue priorities and the thread pool spins up automatically.#include "cppq.hpp" // Define your task handler void HandleEmail(cppq::Task& task) { auto payload = json::parse(task.payload); // ... send the email ... task.result = "{\"sent\": true}"; } int main() { // Register handler for task type cppq::registerHandler("email:deliver", &HandleEmail); // Connect to Redis redisOptions opts = {0}; REDIS_OPTIONS_SET_TCP(&opts, "127.0.0.1", 6379); auto* c = redisConnectWithOptions(&opts); // Enqueue tasks on named queues cppq::Task t{"email:deliver", payload, 10}; cppq::enqueue(c, t, "high"); // Start the worker server cppq::runServer(opts, { {"low", 5}, {"default", 10}, {"high", 20} }, 1000); }
A clean, pipeline-based architecture built on Redis primitives.
Enqueues Task objects
Lists, hashes, Lua scripts
Thread pool + handlers
Stored back in Redis
A library, a CLI, and a dashboard — everything ops teams need.
Header-only queue library with task creation, enqueuing, scheduling, recovery, pause/unpause, and a built-in thread pool. One file, zero build system configuration.
Inspect queues, view task states and stats, pause or resume processing, and dump task metadata for debugging. Built with Click and Rich for beautiful terminal output.
Real-time monitoring dashboard with task inspection, queue controls, and statistics. Built with Next.js 15, React 19, and Tailwind CSS for a modern interface.
Works on Linux, macOS, and any POSIX system with a C++17 compiler.
One header. Two dependencies. Zero configuration. Join the developers building reliable async systems in C++.