The Dramatiq engine adapter for z4j.
Streams supported Dramatiq actor lifecycle events from your workers to the
z4j and accepts operator control actions from the dashboard.
Dramatiq has no upstream scheduler, so for periodic schedules pair with
z4j-scheduler.
- Dramatiq 1.14+ (no upper bound)
- Python 3.11+
Full per-adapter matrix at https://docs.z4j.com/reference/compatibility/.
| Capability | Notes |
|---|---|
| Message lifecycle events | received, started, succeeded, retried, failed |
| Actor discovery | Dramatiq's runtime broker registry |
| Submit | direct against the Dramatiq broker |
| Retry | only with complete operator-supplied replacement args and kwargs |
| Cancel pending task | requires z4j-dramatiq[abort] and Abortable middleware; does not interrupt running work |
| Purge queue | with confirm-token guard |
| Reconcile task | reports honest unknown (Dramatiq has no queryable-by-id result store); the brain's event-derived state stays authoritative |
Captured via Dramatiq's middleware hook system, your existing actors do not need to be decorated or modified.
pip install z4j-dramatiqBulk retry and dead-letter replay are not advertised because stock Dramatiq
does not expose recoverable completed-message or dead-letter APIs. Pending-task
cancel is advertised only when the external dramatiq-abort Abortable
middleware is installed. z4j uses its pending-only mode because interrupting a
running task can interact with Dramatiq retries and enqueue another attempt.
Pair with a framework adapter:
pip install z4j-django z4j-dramatiq # Django
pip install z4j-flask z4j-dramatiq # Flask
pip install z4j-fastapi z4j-dramatiq # FastAPI
pip install z4j-bare z4j-dramatiq # framework-free workerFor schedules, install z4j-scheduler as a separate process.
- Lifecycle-capture failures are isolated from Dramatiq middleware and actor code; capture hooks make no brain network request inline.
- The in-process event queue and SQLite outbound buffer are bounded. Queue overflow drops new events and buffer pressure evicts oldest rows; both losses are logged.
Full docs at docs.z4j.com/engines/dramatiq/.
Apache-2.0, see LICENSE.
- Homepage: https://z4j.com
- Documentation: https://docs.z4j.com
- PyPI: https://pypi.org/project/z4j-dramatiq/
- Issues: https://github.com/z4jdev/z4j-dramatiq/issues
- Changelog: CHANGELOG.md
- Security: security@z4j.com (see SECURITY.md)