Skip to main content

Quick Start

Add Jobs to a Queue

The simplest way to add jobs is using the stateless API:

Process Jobs with a Worker

Create a processor function and start a worker:

Adding to Supervision Tree

For production use, add workers to your application’s supervision tree:

Job Options

Basic Options

Job Deduplication

Worker Configuration

Worker with Event Callbacks

Rate Limiting

Job Processing

Basic Processor

With Progress Updates

Error Handling

Queue Events

Subscribe to queue-level events using QueueEvents:

Job Schedulers (Repeatable Jobs)

Cron-based Scheduling

Interval-based Scheduling

Managing Schedulers

Queue Operations

Get Queue Information

Pause and Resume

Clean Up Jobs

Parent-Child Jobs (Flows)

Create job dependencies using FlowProducer:

Graceful Shutdown

Interoperability

Jobs added in Elixir can be processed by workers in other languages: Node.js Worker:
Python Worker:

Best Practices

  1. Use supervision trees - Always supervise workers for automatic restarts
  2. Set appropriate concurrency - Balance between throughput and resource usage
  3. Use named connections - Makes it easier to manage multiple Redis instances
  4. Handle errors gracefully - Return {:error, reason} for retries, :error or raise for failures
  5. Monitor with Telemetry - Set up telemetry handlers for observability
  6. Use rate limiting - Prevent overwhelming external services
  7. Clean up old jobs - Use remove_on_complete and remove_on_fail options

View Changelog

See what’s new in the latest version