NATSEventBridge publishes events to a NATS subject and subscribes to the same subject for inbound forwarding.
Go support
- Go
- Rust
NATSEventBridge is not implemented in abxbus-go yet. Use JSONLEventBridge for the currently supported Go bridge.Optional dependencies
- Python
- TypeScript
- Go
- Rust
Install the NATS extra (recommended):Equivalent direct dependency install:
Constructor params
server: NATS server URL (for examplenats://localhost:4222)subject: subject name used for publish/subscribename: optional bridge label
- Python
- TypeScript
- Go
- Rust
Setup with a bus
- Python
- TypeScript
- Go
- Rust
Behavior
emit(...)publishes serialized event JSON bytes to the configured subject.on(...)registers inbound handlers and auto-starts subscription.- Inbound messages are decoded, reset, and re-emitted on the internal bus.
close()drains/closes NATS connections and stops the internal bus.- Runtime requirements: Python needs
nats-py, TypeScript needsnatsand Node.js.