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 | - | ✓ | - | - | - | - |
| List dead letters | - | ✓ | - | - | - | - |
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, and promotes
dead-letter listing on its Redis, RabbitMQ and stub brokers. Huey's default
cancel is also pending-only. Neither adapter interrupts running work. The
dashboard and API gate retry and cancel 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 / task_revoked signals, plus a broker-events consumer in the worker's main process for the events prefork children raise |
| RQ | wrap of Worker.execute_job (the parent-side execution boundary) + optional per-job callbacks |
| Dramatiq | custom Middleware that hooks after_enqueue / before_process_message / after_process_message |
| Huey | handlers on eleven Huey signals, from SIGNAL_ENQUEUED / SIGNAL_EXECUTING / SIGNAL_COMPLETE to the retry, error, revoke, lock and expiry signals |
| arq | on_job_start / on_job_end hooks on the worker |
| taskiq | middleware: TaskiqMiddleware.pre_send / pre_execute / post_execute / on_error |
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.