<div align="center">
```
____ ____ ____ _ ____ _____ ____ _
/ _ \/ __\/ _ \/ \ /|/ _ \/__ __\/ _\/ \ /|
```bash
buswatch --connect localhost:9090
```
### Subscribe to RabbitMQ
```bash
buswatch --subscribe rabbitmq.toml --topic caryatid.monitor.snapshot
```
## Architecture
```
┌─────────────────┐ ┌─────────────────┐ ┌──────────────┐
│ Your App │ │ Message Bus │ │ │
│ + buswatch-sdk │────▶│ (RabbitMQ, │◀────│ buswatch │
│ │ │ Kafka, NATS) │ │ TUI │
└─────────────────┘ └─────────────────┘ └──────────────┘
│
▼
┌─────────────────┐
│ buswatch-adapters│
│ (collectors) │
└─────────────────┘
```
**Two ways to get data into buswatch:**
1. **Instrumentation (push)**: Add `buswatch-sdk` to your app and emit metrics
2. **Adapters (pull)**: Use `buswatch-adapters` to collect from your message bus
## Wire Format
All components communicate using the [buswatch snapshot format](/buswatch-types/schema/snapshot.schema.json):
```json
{
"version": { "major": 1, "minor": 0 },
"timestamp_ms": 1703160000000,
"modules": {
"order-processor": {
"reads": {
"orders.new": { "count": 1500, "backlog": 23 }
},
"writes": {
"orders.processed": { "count": 1497 }
}
}
}
}
```
See [buswatch-types](/buswatch-types) for the full schema and serialization options.
## Features
- **Real-time TUI** with summary, bottleneck, and flow views
- **Health detection** based on configurable thresholds
- **Sparklines** for visualizing trends
- **Multiple data sources**: files, TCP streams, message bus subscriptions
- **Instrumentation SDK** for Rust applications
- **Adapters** for RabbitMQ, Kafka, and NATS
- **OpenTelemetry** export support
- **JSON and CBOR** serialization
## License
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.