Event adapters connect Rohas to various message brokers and event systems. Adapters handle the pub/sub messaging layer that enables event-driven communication between components.
Overview
Adapters abstract the underlying message broker implementation, allowing you to:
Switch between different brokers without code changes
Use in-memory adapter for development
Use production-grade brokers (Kafka, RabbitMQ, etc.) in production
Support multiple adapters for different use cases
Available Adapters
Memory Adapter (Default)
In-memory event bus using Rust's broadcast channels. Perfect for development, testing, and single-instance deployments.
Features:
Zero external dependencies
Fast in-memory messaging
Automatic topic creation
Configurable buffer size
No persistence (messages lost on restart)
Configuration:
[adapter]type="memory"buffer_size=1000# Maximum messages per topic
Use cases:
Local development
Testing
Single-instance applications
Prototyping
Limitations:
No persistence
Single process only
No message durability
NATS Adapter
Connect to NATS messaging system for high-performance, cloud-native event streaming.