Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mminer/redis2ws
Rust WebSockets server that broadcasts Redis Pub/Sub messages
https://github.com/mminer/redis2ws
pubsub redis rust tungstenite websockets
Last synced: 3 days ago
JSON representation
Rust WebSockets server that broadcasts Redis Pub/Sub messages
- Host: GitHub
- URL: https://github.com/mminer/redis2ws
- Owner: mminer
- License: unlicense
- Created: 2023-04-08T04:56:33.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-08T05:06:48.000Z (almost 2 years ago)
- Last Synced: 2024-11-19T12:08:38.613Z (2 months ago)
- Topics: pubsub, redis, rust, tungstenite, websockets
- Language: Rust
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redis2ws (Redis to WebSockets)
This demonstrates a Rust WebSockets server that broadcasts Redis Pub/Sub
messages to connected clients. Glues together the
[redis](https://docs.rs/redis/latest/redis/) and
[tungstenite](https://docs.rs/tungstenite/latest/tungstenite/) crates.## Usage
1. Start a Redis server
1. Run `cargo run foo`
1. Connect to ws://localhost:8080
([wscat](https://github.com/websockets/wscat) works well for testing)
1. Publish a message to the Redis `foo` channel```
Usage: redis2ws [OPTIONS]Arguments:
Redis PubSub channelOptions:
--redis Redis server address [default: localhost:6379]
--ws WebSocket server address [default: localhost:8080]
-h, --help Print help
-V, --version Print version
```