TacoQ is a task queue system that allows you to schedule tasks to be executed asynchronously in workers outside your application. (e.g. in a different container).
To properly use TacoQ, it is recommended that you have a basic understanding of the core concepts of task queues. This section will provide a rapid-fire overview of the most important topics so you can hit the ground running.
Tasks are a unit of work that can be scheduled to be executed asynchronously. Here are some core properties of tasks that you should know about:
worker_kind
and a task_kind
, which are used to identify
which set of workers should execute each task (respectively). If you are
familiar with message brokers, you can think of them as routing keys.priority
value, which is used to sort tasks and determine which
ones to assign to workers first. Once a task reaches a worker, its priority
will no longer matter and it will be executed no matter what its priority is.id
, which is a unique identifier for the task
that can be later used to retrieve the task's status and results.The message broker carries task assignments, status updates, and results across the entire TacoQ system. The broker is also responsible for routing the tasks to the correct set of workers based on its properties.
TacoQ uses RabbitMQ as its message broker.
Workers receive task assignments from the message broker, execute them, and then send the result back through the message broker so they can be stored in the database.
TacoQ uses Postgres as its database.
To publish a task, you can use a publisher client that abstracts away the message broker and allows you to send a task to the workers and database.
The publisher does not need to be a dedicated application. Instead, any service can embed the publisher in its code to publish tasks, even workers.
The relay is a unique concept to TacoQ. It is a service that acts as TacoQ's core engine, and has the following characteristics:
The relay is horizontally scalable and can be easily replicated.
TacoQ aims to differentiate itself from other task queues by providing the following features:
pydantic
, having a type safe API, built-in hot reloading, and more.You can learn more about TacoQ's architecture and design in the System Architecture section.
Last updated: 4/6/2025