System Architecture
CORE FEATURES
Disk Persistence
Backed by KVRocks (RocksDB on SSD). Keeps list operations O(1) while storing massive datasets on disk, not RAM.
Strict Leases
Workers claim exclusive leases (TTL). Crashed workers automatically release tasks back to the pool, guaranteeing at-least-once delivery.
Priority Tiers
Supports 10 priority levels (0-9). High-priority tasks jump the queue, ensuring critical agent operations are processed first.
Backoff & DLQ
Configurable exponential backoff with jitter. Tasks exceeding `maxAttempts` move to a Dead Letter Queue (DLQ) for inspection.
Reactive Signals
Pull-based consumption with advisory Webhook signals. Wakes up idle workers immediately when new priority tasks arrive.
Result Storage
Task results are persisted and queryable. Supports result callbacks (Webhooks) to notify upstream agents upon completion.
Get started
# 1. Install codeQ CLI via npm
$ npm install -g @codeq/cli
# 2. Verify installation
$ codeq --version
codeq version 1.2.4
# 3. Configure connection (optional)
$ codeq config set endpoint http://localhost:8080
Benchmark
Why store queue data in RAM? codeQ leverages SSDs via KVRocks to provide massive capacity at a fraction of the cost of Redis.
Storage Cost vs Capacity
INFRASTRUCTUREcodeQ (SSD) scales linearly in cost, whereas standard Redis (RAM) hits a vertical cost wall as queue depth increases.
Latency vs Queue Depth
STABILITYTechnical FAQ
Why use KVRocks instead of Redis?
How does the Lease system work?
Claim a task. This grants an exclusive lease (e.g., 60s). If the worker crashes or fails to heartbeat, codeQ automatically returns the task to the pending queue when the lease expires, guaranteeing reliability.