Documentation Index
Fetch the complete documentation index at: https://abxbus.archivebox.io/llms.txt
Use this file to discover all available pages before exploring further.
abxbus: Production-ready multi-language event bus
AbxBus is an in-memory event bus for async Python, TypeScript (Node and browser environments), Rust, and Go, built for predictable event-driven workflows with strong typing and consistent cross-language behavior.
Core strengths:
- Typed event payloads and typed handler return values
- Deterministic queue semantics with configurable concurrency
- Nested event lineage tracking (
event_parent_id / event_path)
- Event forwarding, bridge transports, and middleware integration
Minimal usage
Python
TypeScript
Rust
Go
from abxbus import BaseEvent, EventBus
class SomeEvent(BaseEvent):
some_data: int
async def on_some_event(event: SomeEvent) -> None:
print(event.some_data)
# 132
bus = EventBus('MyBus')
bus.on(SomeEvent, on_some_event)
await bus.emit(SomeEvent(some_data=132)).now()
import { BaseEvent, EventBus } from "abxbus";
import { z } from "zod";
const SomeEvent = BaseEvent.extend("SomeEvent", {
some_data: z.number(),
});
const bus = new EventBus("MyBus");
bus.on(SomeEvent, async (event) => {
console.log(event.some_data);
});
await bus.emit(SomeEvent({ some_data: 132 })).now();
use abxbus_rust::{event, event_bus::EventBus};
use futures::executor::block_on;
event! {
struct SomeEvent {
some_data: i64,
event_result_type: String,
}
}
let bus = EventBus::new(Some("MyBus".to_string()));
bus.on(SomeEvent, |event: SomeEvent| async move {
Ok(format!("did something with {}", event.some_data))
});
let event = bus.emit(SomeEvent { some_data: 132, ..Default::default() });
block_on(event.now())?;
package main
import (
"fmt"
abxbus "github.com/ArchiveBox/abxbus/abxbus-go/v2"
)
func main() {
bus := abxbus.NewEventBus("MyBus", nil)
bus.On("SomeEvent", "on_some_event", func(event *abxbus.BaseEvent) (any, error) {
fmt.Println(event.Payload["some_data"])
return nil, nil
}, nil)
event := bus.Emit(abxbus.NewBaseEvent("SomeEvent", map[string]any{"some_data": 132}))
_, _ = event.Now()
}
See Quickstart for installation and first full example.
Repository examples
Runnable end-to-end examples and implementation smoke tests live in the repo:
- Quickstart basics:
- Concurrency modes, overrides, and timeout behavior:
- Immediate execution (queue-jump) behavior:
- Forwarding between buses:
- Parent-child lineage tracking:
- Tree logs with nested timeout outcomes:
- Rust parity and roundtrip tests:
- Go parity and roundtrip helper: