OneOpen Broker
A lightweight, Python-native, single-node message broker with first-class Celery support, durable task queues, Pub/Sub, and built-in monitoring — without Redis or RabbitMQ.
OneOpen Broker is not a Redis, RabbitMQ, or Kafka replacement. Those products solve broader problems. V1 is a focused broker for single-server Python applications talking to multiple Celery workers.
Install
pip install oneopen-broker
Celery support:
pip install "oneopen-broker[celery]"
Start the broker
oneopen-broker start
Default listen address: 127.0.0.1:6380.
oneopen-broker start --host 127.0.0.1 --port 6380 --data-dir ./data
Celery
import oneopen_broker # registers the oneopen:// Kombu transport
from celery import Celery
app = Celery("myapp", broker="oneopen://127.0.0.1:6380")
celery -A myapp worker --concurrency=4
Native client
from oneopen_broker import AsyncBroker
broker = AsyncBroker("127.0.0.1", 6380)
await broker.connect()
await broker.publish(queue="gpu", payload=b"...")
message = await broker.consume("gpu")
try:
await process(message.payload)
await message.ack()
except Exception:
await message.nack(requeue=True)
Pub/Sub is ephemeral: disconnected subscribers miss messages published while they are away.
async for event in broker.subscribe("events"):
print(event.payload)
Delivery semantics
V1 provides at-least-once delivery. Consumers must tolerate duplicates after crashes or ambiguous acknowledgements. Exactly-once delivery is not claimed.
Durability
Persistence is an append-only file plus periodic snapshots. No external database.
persistence.fsync |
Guarantee |
|---|---|
always |
Publish/ACK responses wait until the record is fsync'd |
everysec (default) |
Responses return after the in-memory commit; disk is fsync'd at most once per second. Up to about one second of acknowledged work may be lost on a crash |
none |
OS page cache only; fastest, weakest |
Inflight messages at broker crash are recovered as deliverable (ACK was not proven).
Configuration
YAML file, environment variables (ONEOPEN_*), and CLI flags. See oneopen-broker start --help.
server:
host: 127.0.0.1
port: 6380
persistence:
directory: ./data
fsync: everysec
snapshot_interval: 300
queues:
default_visibility_timeout: 300
default_max_attempts: 3
network:
max_connections: 10000
max_frame_size: 16777216
pubsub:
subscriber_buffer: 1000
security:
tls:
enabled: false
auth:
enabled: false
Monitoring
oneopen-broker stats
oneopen-broker queues
oneopen-broker queue gpu_tasks
oneopen-broker consumers
oneopen-broker channels
oneopen-broker dlq gpu_tasks
oneopen-broker top
The CLI talks to the broker over the same protocol as clients. It does not read memory or persistence files.
Security
V1 is intended for private networks. Bind to localhost by default. Optionally require a token and TLS:
security:
tls:
enabled: true
certfile: /etc/oneopen/server.crt
keyfile: /etc/oneopen/server.key
cafile: /etc/oneopen/ca.crt
require_client_cert: false
auth:
enabled: true
users:
- name: app
token: change-me
role: producer
- name: worker
token: change-me-too
role: consumer
- name: ops
token: change-me-admin
role: admin
Roles: admin, producer, consumer, subscriber, monitor.
oneopen-broker start --auth-token "$ONEOPEN_AUTH_TOKEN" --tls-cert server.crt --tls-key server.key
oneopen-broker stats --token "$ONEOPEN_AUTH_TOKEN"
broker = AsyncBroker("127.0.0.1", 6380, token="change-me", ssl=True, ssl_cafile="ca.crt")
Celery (token in the URL password; empty user):
app = Celery("myapp", broker="oneopen://:change-me@127.0.0.1:6380")
Credentials are compared with a timing-safe digest and are never logged. Auth is off unless you enable it, so existing local setups keep working.
Requirements
- Python 3.11+
- One process, one asyncio event loop, one server
V1 does not cluster, replicate, or speak the Redis protocol.
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 oneopen_broker-0.1.0.tar.gz.
File metadata
- Download URL: oneopen_broker-0.1.0.tar.gz
- Upload date:
- Size: 52.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ebe3e91bd7aebfcc5a7a5597ce287a38236a273e52cda47c6067ba1cb9e4eb9
|
|
| MD5 |
7c0aa2e692e5b777684392bcb6923513
|
|
| BLAKE2b-256 |
7c602e6aa314c5aa68999d18c560c815f6c2cea34374d3e674be21867878de6f
|
File details
Details for the file oneopen_broker-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oneopen_broker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 66.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33c7b6eed9b89ed04d8067db1241fb827ae7637f25b3c2c6132ec08a54f4c515
|
|
| MD5 |
8ad107933333665edc883e6bd9307e70
|
|
| BLAKE2b-256 |
8290e4bae14a8fb557d821ad495c7bcf05edb5916ea9eea40082909680f26afd
|