Engines overview
z4j supports six engines, each with its own adapter package (z4j-<engine>).
| Engine | Package | Broker | Strengths | Default scheduler |
|---|---|---|---|---|
| Celery | z4j-celery |
Redis / RabbitMQ / SQS | Massive ecosystem, chords/groups/chains | celery-beat |
| RQ | z4j-rq |
Redis | Simple, small surface, Python-only | rq-scheduler |
| Dramatiq | z4j-dramatiq |
Redis / RabbitMQ | Reliable, middleware-first | APScheduler |
| Huey | z4j-huey |
Redis / Sqlite / in-memory | Minimal deps, great for Django | built-in periodic |
| arq | z4j-arq |
Redis | Async-native, great for FastAPI | arq cron |
| taskiq | z4j-taskiq |
Redis / RabbitMQ / NATS / in-memory | Modern async, pluggable brokers | taskiq-scheduler |
Installing
Section titled “Installing”Pick one or more. They can coexist in the same process:
pip install z4j-celery z4j-rq z4j-dramatiqCapability matrix
Section titled “Capability matrix”| Advertised action | Celery | RQ | Dramatiq | Huey | arq | taskiq |
|---|---|---|---|---|---|---|
| Submit task | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Retry task | ✓ | ✓ | ✓ | ✓ | - | - |
| Cancel task | ✓ | ✓ | - | ✓ | ✓ | - |
| Bulk retry | ✓ | ✓ | - | - | - | - |
| Purge queue | ✓ | ✓ | ✓ | - | - | - |
| Requeue dead letter | - | ✓ | - | - | - | - |
The matrix shows each adapter's default capabilities. Dramatiq additionally
promotes pending-only cancel when z4j-dramatiq[abort] is installed and the
broker contains a real dramatiq_abort.Abortable middleware. Huey's default
cancel is also pending-only. Neither adapter interrupts running work. The
dashboard and API gate controls on the capabilities advertised by the
connected adapter; they do not synthesize unsupported retry, cancel, bulk, or
purge actions. Celery additionally advertises its remote worker-control
operations; see the engine page for that wider surface.
Event capture strategy
Section titled “Event capture strategy”Each adapter uses the engine's native signal / middleware / hook system:
| Engine | Capture mechanism |
|---|---|
| Celery | task_received / task_prerun / task_postrun / task_retry / task_failure signals |
| RQ | Queue.enqueue_call monkey-patch + job lifecycle hooks |
| Dramatiq | custom Middleware that hooks before_process_message / after_process_message |
| Huey | signal handlers (SIGNAL_ENQUEUED / SIGNAL_EXECUTING / SIGNAL_EXECUTED) |
| arq | on_job_start / on_job_end hooks on the worker |
| taskiq | middleware: TaskiqMiddleware.pre_send / post_execute |
Patches are additive - they don't replace your existing signal handlers.
Per-engine pages
Section titled “Per-engine pages”See the left sidebar - one page per engine with install, config, events, actions, and caveats.