This project is a lightweight real-time messaging server built with Axum, using Server-Sent Events (SSE) and topic-based broadcasting. It allows clients to subscribe to specific topics and receive live messages pushed from the server.
- π Real-time streaming via Server-Sent Events (SSE)
- π¨ Topic-based broadcasting using
tokio::broadcast - π§΅ Thread-safe shared state with
Arc<Mutex<...>> - β‘ Built with async Rust using
tokioandaxum
struct AppState {
topics: Arc<Mutex<HashMap<String, broadcast::Sender<BroadcastMessage>>>>,
}