topic-stream
topic_stream is an asynchronous, topic-based publish-subscribe library for Rust, designed to provide an efficient way to broadcast messages to multiple subscribers. It leverages async-broadcast for message passing and dashmap for concurrent topic management.
Features
-
Topic-Based Messaging: Subscribers receive messages based on topics they subscribe to.
-
Asynchronous & Non-Blocking: Uses async-broadcast for efficient message delivery.
-
Multiple Subscribers per Topic: Supports multiple receivers listening to the same topic.
-
Multi-Topic Subscription: Subscribe to multiple topics simultaneously and receive messages from all of them.
Usage
Here's a basic example of how to use topic_stream:
use TopicStream;
async
Running Tests
cargo test
License
This project is licensed under the MIT License.
Contributions
Contributions, issues, and feature requests are welcome! Feel free to submit a PR or open an issue.