QuillMQ: a lightweight single-node message broker (work queues, pub/sub, RPC, durable delivery).
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quillmq-0.1.0.tar.gz.
File metadata
- Download URL: quillmq-0.1.0.tar.gz
- Upload date:
- Size: 99.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8613bd864cde6bda1563a9395e3912fcb80d42efe9da660b0c1cb1316e94ccfe
|
|
| MD5 |
b9e19dbf0b4dff77eec9f38d7f466eac
|
|
| BLAKE2b-256 |
9391aae1ef0c2936bfe29100724d8f0524cdf23eb1d58cccb09381b6937cc28f
|
Provenance
The following attestation bundles were made for quillmq-0.1.0.tar.gz:
Publisher:
publish.yml on bha6kar/quillmq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quillmq-0.1.0.tar.gz -
Subject digest:
8613bd864cde6bda1563a9395e3912fcb80d42efe9da660b0c1cb1316e94ccfe - Sigstore transparency entry: 2143515822
- Sigstore integration time:
-
Permalink:
bha6kar/quillmq@6d58abc7e0ac9717fe3b7ce329970e7737984e12 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/bha6kar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6d58abc7e0ac9717fe3b7ce329970e7737984e12 -
Trigger Event:
push
-
Statement type:
File details
Details for the file quillmq-0.1.0-py3-none-any.whl.
File metadata
- Download URL: quillmq-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c3441573c2c7bf22d734e8dd40f312a8eeba56658e65beebe6c4e74cb241bf7
|
|
| MD5 |
4c0a1a564f572d4b6c00252579af0416
|
|
| BLAKE2b-256 |
39a3e602c73ac4619595f4e2223feaa65b7f1601003fc5e57629a9541a237ab1
|
Provenance
The following attestation bundles were made for quillmq-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on bha6kar/quillmq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quillmq-0.1.0-py3-none-any.whl -
Subject digest:
7c3441573c2c7bf22d734e8dd40f312a8eeba56658e65beebe6c4e74cb241bf7 - Sigstore transparency entry: 2143516077
- Sigstore integration time:
-
Permalink:
bha6kar/quillmq@6d58abc7e0ac9717fe3b7ce329970e7737984e12 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/bha6kar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6d58abc7e0ac9717fe3b7ce329970e7737984e12 -
Trigger Event:
push
-
Statement type: