Skip to main content

z4j-taskiq

PyPI version Python License

The TaskIQ engine adapter for z4j.

Streams supported TaskIQ task lifecycle events from your async workers to z4j and accepts operator control actions from the dashboard. Pair with z4j-taskiqscheduler to surface taskiq-scheduler periodic jobs.

Compatibility

  • TaskIQ 0.11+ and <1 (capped below the eventual TaskIQ 1.0 breaking-major)
  • Python 3.11+

Full per-adapter matrix at https://z4j.dev/reference/compatibility/.

What it ships

Capability Notes
Task lifecycle events received, started, succeeded, retried, failed
Task discovery runtime broker task registry (broker.get_all_tasks())
Submit task enqueue a registered task against the TaskIQ broker via .kiq(); an omitted queue or z4j's logical default queue uses the broker default
Reconcile task via the configured TaskIQ result backend

Async-native, uses TaskIQ's middleware hook system.

TaskIQ network brokers and result backends belong to the event loop that started them, while the z4j agent runs on its own background loop. Attach the middleware before broker startup so the adapter records the broker's owner loop and marshals submit and reconcile calls back to it:

adapter = TaskiqEngineAdapter(broker=broker)
attach_to_broker(broker, adapter=adapter)

Attach before the TaskIQ CLI or your application lifespan starts the broker; that host owns broker startup and shutdown. Do not start an already host-managed broker a second time. A standalone manual client must start and shut down its broker exactly once in its own lifecycle.

If installation itself runs inside a TaskIQ startup callback without the middleware, pass broker_loop=asyncio.get_running_loop() explicitly. Do not capture a temporary loop created by asyncio.run(); that loop closes when the call returns. Until either startup binding or explicit binding has happened, submit and result-backend probes fail closed; they never guess that the z4j agent's background loop owns the broker.

Control actions beyond submit (retry, cancel, bulk retry, purge queue) are not yet supported. TaskIQ's broker-agnostic design means each broker needs its own implementation, so the dashboard greys these actions out for TaskIQ engines until per-broker support lands.

TaskIQ has no portable named-queue, ETA, or priority override. Submit accepts an omitted queue and the canonical logical queue default, both of which use the broker's configured default. Any other queue name, ETA, or priority is rejected before enqueue rather than silently misrouted.

Install

pip install z4j-taskiq z4j-taskiqscheduler

Pair with a framework adapter:

pip install z4j-fastapi z4j-taskiq z4j-taskiqscheduler
pip install z4j-bare    z4j-taskiq z4j-taskiqscheduler   # framework-free worker

Pairs with

Reliability

  • Lifecycle-capture failures are isolated from TaskIQ middleware and task 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.

Documentation

Full docs at z4j.dev/engines/taskiq/.

License

Apache-2.0, see LICENSE.

Links

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

z4j_taskiq-1.10.0.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

z4j_taskiq-1.10.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file z4j_taskiq-1.10.0.tar.gz.

File metadata

  • Download URL: z4j_taskiq-1.10.0.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for z4j_taskiq-1.10.0.tar.gz
Algorithm Hash digest
SHA256 30d940f53e868c94fd46504fd27081dab2cb9f37ebe3b91be6a5b6c56369f2d2
MD5 09ca31b14babe16cf344af0e3b194936
BLAKE2b-256 7d462fd4cb01122150dbcced954f59ee9411ac7829efe0d5402b0e2310b1fde5

See more details on using hashes here.

File details

Details for the file z4j_taskiq-1.10.0-py3-none-any.whl.

File metadata

  • Download URL: z4j_taskiq-1.10.0-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for z4j_taskiq-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67075a7081fdd3983f5e80e67e41037bd0225e77672e5cfdf4680f07e8668080
MD5 a60b6c6d4fee81f0672f7d145bdb0a8e
BLAKE2b-256 6bc58cadafc3b8ee6af5b972730716312f963b01b2abcc33654c00c28a612288

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.10.0 This release

2 files

1.9.1

2 files

1.9.0

2 files

1.8.0

2 files

1.7.0

2 files

1.6.7

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.1.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page