QuillMQ
A lightweight, single-node message broker written from scratch in Python asyncio. It provides work queues, pub/sub fan-out, RPC request/reply, and at-least-once durable delivery over a small custom TCP protocol. No RabbitMQ or AMQP dependency.
QuillMQ is to RabbitMQ what SQLite is to PostgreSQL: not a replacement for a clustered production broker, but the better fit when you want embeddable, single-node, zero-ops messaging you can read and own. See COMPARISON.md for an honest side-by-side.
Install
uv sync --extra dev
Run the broker
uv run quillmq serve --port 5555 --data ./quill.db
Omit --data for an in-memory broker.
Python client
from quillmq import connect
conn = await connect("quill://127.0.0.1:5555")
ch = await conn.channel()
await ch.declare_queue("tasks", durable=True)
await ch.publish("", "tasks", {"job": 1})
async for msg in ch.consume("tasks", prefetch=10):
handle(msg.body)
await msg.ack()
Patterns
- Work queue: many consumers on one queue compete; each message is delivered once.
- Pub/sub: bind several queues to a
fanoutortopicexchange. - RPC:
await ch.rpc_call("service.rpc", {...}), served byquillmq.rpc.RPCServer.
CLI
quillmq serve --port 5555 --data ./quill.db
quillmq publish "" tasks '{"job": 1}'
quillmq stats
quillmq tail tasks
Running in production (single node)
QuillMQ is single-node by design (no clustering), but a single instance is built to run as a real service:
quillmq serve \
--port 5555 \
--data ./quill.db \
--auth-token "$QUILLMQ_AUTH_TOKEN" \
--tls-cert cert.pem --tls-key key.pem \
--heartbeat 60 \
--max-delivery-count 10 --dead-letter-queue dead \
--metrics-port 9095 \
--json-logs
- Structured logging (text or JSON), and graceful shutdown on SIGTERM/SIGINT.
- Idle connections are reaped after
--heartbeatseconds; clients send keepalives automatically. - Poison messages are dead-lettered after
--max-delivery-countattempts; set a per-message TTL with attlheader (seconds). - TLS: pass
--tls-cert/--tls-keyand connect with aquills://URL. - Prometheus metrics are served at
http://host:9095/metrics. - Every flag has a
QUILLMQ_*environment variable equivalent.
Docker
docker compose up --build
This starts a durable broker on port 5555 with a named volume for persistence. To build the image directly:
docker build -t quillmq:latest .
Behind a TLS-intercepting corporate proxy, pass your CA or, as a last resort:
docker build -t quillmq:latest \
--build-arg UV_SYNC_FLAGS="--allow-insecure-host pypi.org --allow-insecure-host files.pythonhosted.org" .
Licence
Apache-2.0.
Metadata
Release files for quillmq 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| quillmq-0.1.0.tar.gz | 99.4 kB | With provenance | Details for quillmq-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quillmq-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for quillmq-0.1.0-py3-none-any.whl |
Total release size: 123.0 kB
Release files / quillmq-0.1.0.tar.gz
| Download URL | quillmq-0.1.0.tar.gz |
|---|---|
| Size | 99.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8613bd864cde6bda1563a9395e3912fcb80d42efe9da660b0c1cb1316e94ccfe
|
|
BLAKE2b-256 checksum How to use checksums |
9391aae1ef0c2936bfe29100724d8f0524cdf23eb1d58cccb09381b6937cc28f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 11, 2026.
Transparency logRelease files / quillmq-0.1.0-py3-none-any.whl
| Download URL | quillmq-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c3441573c2c7bf22d734e8dd40f312a8eeba56658e65beebe6c4e74cb241bf7
|
|
BLAKE2b-256 checksum How to use checksums |
39a3e602c73ac4619595f4e2223feaa65b7f1601003fc5e57629a9541a237ab1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 11, 2026.
Transparency logSecurity for quillmq 0.1.0
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.
Attestation for quillmq-0.1.0.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 Jul 11, 2026.
Transparency logA 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.