🎉
Introducing Cleo 1.0 - Production Ready!

Distributed
Task processing made elegant

Cleo is an elegant task processing framework for Node.js that makes building distributed task queues simple and enjoyable.
import { Cleo } from "@cleotasks/core";
import { task, QueueClass } from "@cleotasks/core/decorators";
import { TaskPriority } from "@cleotasks/core/types/enums";

@QueueClass({
  defaultOptions: {
    priority: TaskPriority.HIGH,
    maxRetries: 3,
  },
})
class EmailService {
  @task({ id: "send-email" })
  async sendEmail(data: { to: string; template: string }) {
    // Your email logic here
  }
}
🔄

Type-Safe Task Processing

First-class TypeScript support with decorators. Get compile-time validation, autocomplete, and type inference for your tasks.

@task({ id: "process" })
async processData(
  data: ProcessInput
): Promise<Result> {
  // Type-safe processing
}
👥

Advanced Group Processing

Organize tasks with sophisticated group processing strategies. Support for FIFO, Round Robin, and Priority-based execution.

queueManager.setGroupProcessingStrategy(
  GroupProcessingStrategy.PRIORITY
);
📊

Real-time Event System

Build reactive systems with comprehensive event handling. Monitor task lifecycle, progress, and system health in real-time.

queueManager.onTaskEvent(
  ObserverEvent.STATUS_CHANGE,
  (taskId, status) => {
    // Handle status change
  }
);

Redis-Powered Performance

Built on Redis and BullMQ for enterprise-grade reliability. Handles millions of tasks with automatic retries and error handling.

cleo.configure({
  redis: {
    cluster: true,
    nodes: [/*...*/],
  },
});
🚀

Enterprise-Ready Features

Built for production with distributed locks, dead letter queues, rate limiting, and comprehensive monitoring. Scale from startup to enterprise with confidence.

@QueueClass({
  defaultOptions: {
    maxRetries: 3,
    rateLimiter: {
      max: 1000,
      duration: 1000,
    },
  },
})

Getting Started is Easy

1. Install

npm install @cleotasks/core

2. Configure

const cleo = Cleo.getInstance();
cleo.configure({
  redis: { /* config */ }
});

3. Create Tasks

@task()
async processTask() {
  // Your task logic
}

Frequently Asked Questions

How does Cleo compare to BullMQ?

Cleo builds on top of BullMQ to provide a more developer-friendly experience with TypeScript decorators, advanced group processing, and built-in monitoring. While BullMQ handles the core queue functionality, Cleo adds enterprise features and improved DX.

Can I use Cleo in production?

Yes! Cleo is production-ready and is built on battle-tested technologies like Redis and BullMQ. It includes features like dead letter queues, rate limiting, and comprehensive monitoring needed for production deployments.

How does group processing work?

Cleo's group processing allows you to organize related tasks and process them using different strategies (FIFO, Round Robin, Priority). This is perfect for handling user-specific tasks, tenant isolation, or resource allocation.

What's the performance like?

Cleo is highly performant, capable of processing thousands of tasks per second. Built on Redis, it provides low latency and high throughput. The exact performance depends on your task complexity and infrastructure.

Join Our Community

Get help, share your experience, and contribute to making Cleo better.

Ready to Get Started?

Start building scalable task processing systems with Cleo today.