taskferry-servicebus
Run Taskferry tasks on Azure Service Bus — pull-based delivery with unrestricted scheduling.
flowchart LR
APP["Application"] --> TP["Taskferry"] --> AD["taskferry-servicebus"] --> Q["Service Bus queue"] --> C["Azure Functions · Container Apps"]
pip install 'taskferry-servicebus[azure]'
Why it is a separate package from SQS
Both are pull-based queues, and they differ where it counts:
scheduled_enqueue_time_utc accepts any future time, so a task deferred by a
week is a first-class operation here and impossible on SQS, which caps at 900
seconds.
One "queue adapter with a flag" would have to pick a lowest common denominator. Two adapters with two honest capability sets do not. See ADR-0005.
Sending
runtime = Taskferry.from_mapping(
{
"backends": {
"sb": {
"factory": "servicebus",
"connection_string": "Endpoint=sb://...",
"queue_name": "tasks",
}
},
"defaults": {"task": "sb"},
}
)
runtime.tasks.submit("myapp.tasks:reindex", 42, delay=timedelta(days=7))
Managed Identity instead of a connection string:
{
"factory": "servicebus",
"namespace": "myns.servicebus.windows.net",
"credential": DefaultAzureCredential(),
"queue_name": "tasks",
}
Consuming
Azure Functions:
from taskferry import FunctionRegistry
from taskferry_servicebus import process_message
REGISTRY = FunctionRegistry(allowed_modules=["myapp"])
def main(msg: func.ServiceBusMessage) -> None:
process_message(msg.get_body(), registry=REGISTRY)
Container Apps / a plain process:
from taskferry_servicebus import receive_forever
receive_forever(client, "tasks", registry=REGISTRY)
Completes on success, abandons on failure so Service Bus redelivers and
eventually dead-letters per the queue's MaxDeliveryCount.
Capabilities
| Capability | Supported | How |
|---|---|---|
SUBMIT |
yes | send_messages |
DELAY |
yes | scheduled_enqueue_time_utc, unbounded |
RETRY |
yes | the queue's delivery count and dead-letter policy |
DEDUPLICATION |
yes | message_id, when the queue has duplicate detection on |
STATE · RESULT · CANCEL |
no | no lookup of one message after enqueue |
DEDUPLICATION is real but bounded by the queue's duplicate-detection window —
a tool for idempotency, never an exactly-once promise. See
ADR-0010.
License
Apache-2.0.
Release files for taskferry-servicebus 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| taskferry_servicebus-0.3.0.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| taskferry_servicebus-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.2 kB
Release files / taskferry_servicebus-0.3.0.tar.gz
| Download URL | taskferry_servicebus-0.3.0.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5975e3e355687f4ea0e8869a497ce93599659724a9c53a5bd00e1a60b993c01b
|
|
BLAKE2b-256 checksum How to use checksums |
0aa9358d8f507e0df792ac1dc117fa4510e0b2d6417646cee50ac2cbe8b0b10e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / taskferry_servicebus-0.3.0-py3-none-any.whl
| Download URL | taskferry_servicebus-0.3.0-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a906aa0a4b315f6607a1171ef262c1b93ffdf49f7e1caad6f01cc3a546dd9e7
|
|
BLAKE2b-256 checksum How to use checksums |
8f6ca22d3ca3c8d726d6d65cb960a16f27bf46fe1b95781830fca7d25c8480f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency log