ChronoQueue

ChronoQueue is queue management system designed to handle high-volume message processing with efficiency and reliability. It offers a priority-based messaging system, real-time monitoring, and flexible scheduling options, making it an ideal solution for complex asynchronous task management.
Features
-
Priority Queue Management: ChronoQueue allows users to assign priorities to messages, ensuring that critical tasks are processed first. This feature is crucial for systems where task urgency varies significantly.
-
Real-time Monitoring and Analytics (WIP): A dashboard provides a comprehensive overview of all queues and messages, including real-time updates on message statuses, queue health, and system performance metrics.
-
Flexible Scheduling (WIP): Supports both calendar-based and cron expression scheduling, allowing precise control over when messages are processed.
-
High Scalability and Performance: Designed to handle millions of messages efficiently, ChronoQueue ensures high throughput and low latency even under heavy loads.
-
Robust Error Handling and Retry Mechanisms: Automated handling of failed messages with customizable retry policies and error tracking.
-
Secure and Compliant: Adheres to best practices in security and data handling, ensuring that your data is safe and compliant with relevant regulations.
-
Customizable and Extensible: Easily adaptable to specific use cases, with support for custom extensions and integrations.
-
Detailed Documentation and Community Support (WIP): Comprehensive guides, API documentation, and a supportive community for troubleshooting and best practices.
Getting Started
Prerequisites
Installation
Docker Compose Option
The easiest way to get started locally is to use docker-compose. Simply:
-
Clone the repository:
git clone https://github.com/adrien19/chronoqueue.git
-
Cd into deploy - cd deploy and run:
docker-compose up
Run Server Option
-
Clone the repository:
git clone https://github.com/adrien19/chronoqueue.git
-
Install dependencies:
# For Go server
go mod tidy
# For Python/Go clients
pip install chronoqueuesdk
# or
go get https://github.com/adrien19/chronoqueue/client
-
Configure your environment (refer to the .env.example file for guidance).
-
Start the ChronoQueue server:
go run main.go server --dev --server :9000 --redis-password mypassword
If you choose to use mTLS option, you will need to generate certificates. You can use already provided script generate_certs.sh to quickly generate these certificates.
Web UI
ChronoQueue includes a built-in web interface for monitoring and managing your queues, schedules, and dead letter queues.
Starting the Web UI
-
Build the UI assets (first time only):
cd cmd/chronoq/ui
npm install
npm run build:css
cd ../../..
-
Build the ChronoQueue binary:
go build -o chronoqueue .
-
Start the UI server:
./chronoqueue ui start --port 8080 --grpc-address localhost:9000
-
Open your browser to http://localhost:8080
UI Features
- π Real-time Dashboard: Monitor queue metrics, message counts, and system health
- π Queue Management: View queue details, browse messages, and inspect message content
- β° Schedule Management: Create, edit, and manage cron and calendar-based schedules
- π DLQ Management: Inspect failed messages, requeue or purge items from dead letter queues
- π Live Updates: HTMX-powered real-time updates without page refreshes
Development Mode
For UI development with auto-reloading CSS:
# Terminal 1: Watch CSS changes
make ui-watch
# Terminal 2: Run the server
go run main.go server --dev --server :9000
# Terminal 3: Run the UI
go run main.go ui start --port 8080
AI Integration
Model Context Protocol (MCP) Server
ChronoQueue provides a Model Context Protocol (MCP) server that enables AI assistants like Claude, ChatGPT, and custom agents to interact with ChronoQueue for reliable task queuing and scheduling.
Quick Start:
cd mcp
npm install
npm run build
npm start
Features:
- π€ 13 MCP tools for queue, message, and schedule operations
- π Works with VS Code (GitHub Copilot), Claude Desktop, Cursor IDE, and any MCP-compatible client
- π Secure gRPC communication with ChronoQueue server
- π Type-safe TypeScript implementation
Setup Guides:
Documentation
For detailed documentation, including API references and usage examples, visit ChronoQueue Docs
π€ Why not just use Kafka or RabbitMQ?
Kafka and RabbitMQ are excellent message brokers. ChronoQueue is a job execution system built on top of a queue.
The difference matters once you care about runtime guarantees, retries, and failure semantics.
β
What Kafka & RabbitMQ Do Well
They are optimized for:
- High-throughput message delivery
- Fan-out and pub/sub
- Backpressure control
- Durable message storage
- Consumer group mechanics
But they intentionally avoid owning execution semantics.
They answer:
βDid the message get delivered?β
They do not answer:
βIs the job still running correctly?β
β What Kafka & RabbitMQ Do Not Enforce
| Capability |
Kafka |
RabbitMQ |
| Per-message execution timeout |
β |
β |
| Server-side heartbeat enforcement |
β |
β |
| Automatic retry on execution timeout |
β |
β |
| Lease ownership per attempt |
β |
β |
| Dead-letter on timeout |
β οΈ (manual) |
β οΈ (manual) |
| Stale worker protection |
β |
β |
Key limitation:
If a consumer gets stuck for 30 minutes but keeps its TCP session alive, the broker considers the message βhealthyβ forever.
Timeouts, retries, and job supervision must be re-implemented in every worker.
β
What ChronoQueue Adds
ChronoQueue treats every message as a job with an execution contract.
Each message attempt has:
- Server-enforced lease
- Heartbeat supervision
- Automatic retry
- Dead-letter on exhaustion
- Strong ownership via
attempt_id
Core Execution Model
| Feature |
ChronoQueue |
| Per-message lease |
β
|
| Heartbeat-driven lease extension |
β
|
| Max execution cap |
β
|
| Automatic timeout detection |
β
|
| Attempt-based retries |
β
|
| Dead-letter queue |
β
|
| Stale worker prevention |
β
|
ChronoQueue answers:
βIs this job still valid and executing within its allowed window?β
π§ Example: Long-Running File Download
Kafka / RabbitMQ
- Consumer starts download
- Network stalls for 10 minutes
- Broker assumes everything is fine
- No timeout
- No retry
- No supervision
β System is blind
ChronoQueue Features
- Job leased for 3s base + up to 10s extension
- Worker sends heartbeat every 1s
- Lease extends gradually
- If:
- Heartbeats stop β auto timeout
- Max extension exceeded β auto failure
- Message is retried or DLQβd automatically
The serverβnot the workerβenforces correctness.
π Ownership & Safety
Kafka & RabbitMQ:
- Ownership = TCP connection + unacked state
- If workers race or reconnect, behavior can become ambiguous
ChronoQueue:
- Ownership = cryptographically unique
attempt_id
- Every:
- Heartbeat
- ACK
- Failure
must match the active attempt
- Stale workers are automatically rejected
π When Should You Use ChronoQueue?
Use ChronoQueue when you need:
- β
Execution time guarantees
- β
Automatic retries on timeout
- β
Server-side heartbeats
- β
Job-level supervision
- β
Strong worker ownership
Stick with Kafka/RabbitMQ when you only need:
- β
Raw throughput
- β
Stateless consumers
- β
Event streaming
- β
Fire-and-forget messaging
π§© Mental Model
- Kafka/RabbitMQ = Message Delivery Systems
- ChronoQueue = Job Execution & Supervision System
ChronoQueue is closer to Temporal Activities than to traditional brokers.
Examples & Use Cases
The examples/ directory contains comprehensive real-world applications demonstrating ChronoQueue features and best practices:
A complete sample application showcasing all ChronoQueue capabilities through a practical interview evaluation system:
- Priority Queues: Urgent vs standard evaluation processing
- Scheduled Messages: Business hours-based message delivery
- Calendar Schedules: Automated daily/weekly analytics reports
- DLQ & Retry Logic: Robust error handling and retry mechanisms
- Schema Validation: Structured message validation
- Multi-tenant Isolation: Secure tenant data separation
- Heartbeat & Lease Renewal: Worker health monitoring
- Real-time Updates: Server-Sent Events (SSE) integration
Tech Stack: Next.js 14, Go, SQLite, Clerk Auth, Tailwind CSS
View All Examples β
Whether you're a beginner learning the basics or an advanced user exploring multi-tenant patterns, the examples provide production-ready code and architectural guidance to help you build queue-based applications effectively.
Contributing
We welcome contributions! Please read our Contributing Guidelines for detailed information on:
- π Development Setup - Using dev containers for consistent development
- π§ͺ Testing Guidelines - Unit, integration, and E2E test patterns
- π Code Standards - Go style guide and best practices
- π Pull Request Process - Workflow and review expectations
- ποΈ CI/CD Pipeline - Understanding automated checks
Quick Start for Contributors:
- Use the Dev Container (Recommended) - Zero configuration, everything pre-installed
- Fork and clone the repository
- Create a feature branch from
develop
- Make your changes with tests
- Run tests locally:
make test-all
- Submit a pull request with clear description
For questions or discussions, feel free to open an issue or join our community channels.
License
ChronoQueue is licensed under MIT License.
Acknowledgments
Special thanks to all the contributors and users who have made ChronoQueue a robust and evolving system.