Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

benzene-rabbitmq

Host Benzene Python handlers on RabbitMQ — a self-hosted consumer and a RabbitMQ-publish outbound client — the same handlers, no rewrite. Depends only on benzene-core.

pip install benzene-rabbitmq               # the binding + testing helpers
pip install "benzene-rabbitmq[rabbitmq]"   # + pika for the real clients
from benzene.core import application_from, build_application
from benzene.rabbitmq import RabbitMqConsumerApp, RabbitMqMessageSender, run_consumer_loop

# Inbound: one delivery -> one pipeline invocation -> one scope; ack/log, no reply.
definition, _ = build_application(OrdersStartUp)
app = RabbitMqConsumerApp(application_from(definition))
await run_consumer_loop(app, channel, queue="orders")  # channel: a pika channel

# Outbound: publish to an exchange, Benzene topic carried in the `topic` header.
sender = RabbitMqMessageSender("orders-events", host="localhost")
await sender.send_message("orders:created", order, headers={"x-correlation-id": "abc"})
  • Consumer — the Benzene topic comes from the topic header carried in the delivery's AMQP properties.headers (the cross-port convention); the other headers are the Benzene headers (UTF-8), the body is the JSON body. One delivery is one scope; there is no response channel, so the result is acknowledge/log only — run_consumer_loop acks the delivery on success (at-least-once) and nacks a failed one for redelivery. A poison delivery can never crash the loop.
  • Outbound — RabbitMqMessageSender implements the benzene.core.MessageSender port over pika (optional extra), forwarding the header dictionary onto the AMQP properties.headers so correlation/trace propagation rides across the hop.

The binding is duck-typed against pika, so decode, dispatch, and publish are exercised in memory with fakes — no broker, no SDK. Test through benzene.rabbitmq.testing (a native-delivery builder + a test host) or the shared harness (create_test_host(StartUp).build_rabbitmq() + send_rabbitmq) — see the runnable examples/rabbitmq_orders/. Mirrors .NET's Benzene.RabbitMq, and contributes the benzene.rabbitmq subpackage to the shared benzene namespace.

Metadata

Release files for benzene-rabbitmq 0.1.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for benzene-rabbitmq 0.1.0b2
File Size Uploaded Provenance Actions
benzene_rabbitmq-0.1.0b2.tar.gz 8.8 kB With provenance Details for benzene_rabbitmq-0.1.0b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for benzene-rabbitmq 0.1.0b2
File Interpreter ABI Platform Actions
benzene_rabbitmq-0.1.0b2-py3-none-any.whl Python 3 none any Details for benzene_rabbitmq-0.1.0b2-py3-none-any.whl

Total release size: 20.4 kB

Release files / benzene_rabbitmq-0.1.0b2.tar.gz

Download URL benzene_rabbitmq-0.1.0b2.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5f34e28669dff5902030684c6112f4f64e4cd05097f6ffb1164047b9a633db2f
BLAKE2b-256 checksum
How to use checksums
3ff548f45e8119dcd73d228af2c144de6124fcdec2bf805321871909e5006dd2
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 Oct 16, 2026.

Transparency log

Release files / benzene_rabbitmq-0.1.0b2-py3-none-any.whl

Download URL benzene_rabbitmq-0.1.0b2-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8adde8ab38e3609c3e6dae5ec3e9a01524d0e315242d83e0497e6b1a274c99dc
BLAKE2b-256 checksum
How to use checksums
a74ea04d0d3b19399c4a203a380082bb99b5943af5a3090a9e9ed02ba2d8ca68
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 Oct 16, 2026.

Transparency log

Security for benzene-rabbitmq 0.1.0b2

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for benzene_rabbitmq-0.1.0b2.tar.gz

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 Oct 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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