larzbus
In-process pub/sub.
An in-process publish/subscribe event bus with wildcard topics, optional threaded async delivery and a dead-letter path — decoupled events without a message broker.
larzscript pkg install bus
What you get
- Wildcard topics */**
- Threaded async delivery
- Dead-letter path
- No broker
Try it
import "bus" as bus
let b = bus.new()
bus.subscribe(b, "orders.*", fn(topic, payload) { print("exact:", topic, payload) })
bus.subscribe(b, "orders.**", fn(topic, payload) { print("catch-all:", topic) })
print("delivered:", bus.publish(b, "orders.created", {"id": 1}))
print("delivered:", bus.publish(b, "unrelated.thing", {}))
print("dead letters:", b["dead_letters"])Output
exact: orders.created {id: 1}
catch-all: orders.created
delivered: 2
delivered: 0
dead letters: [{topic: unrelated.thing, payload: {}}]Why it's in the Larz Stack
larzbus is a real Larzscript package (larzscript pkg install bus) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.