https://github.com/aramperes/lapin-websocket-prototype
A prototype to broadcast AMQP messages to websocket clients
https://github.com/aramperes/lapin-websocket-prototype
amqp rust tokio warp websocket
Last synced: 2 months ago
JSON representation
A prototype to broadcast AMQP messages to websocket clients
- Host: GitHub
- URL: https://github.com/aramperes/lapin-websocket-prototype
- Owner: aramperes
- License: mit
- Created: 2020-06-23T23:10:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T05:08:56.000Z (almost 6 years ago)
- Last Synced: 2025-01-01T20:45:41.375Z (over 1 year ago)
- Topics: amqp, rust, tokio, warp, websocket
- Language: Rust
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lapin-websocket-prototype
A prototype to broadcast AMQP messages to websocket clients, written in stable Rust
## Objective
Publish a UTF-8 message on an AMQP (RabbitMQ) fanout exchange. Each instance of `lapin-websocket-prototype` will receive this payload,
and broadcast it to the websocket clients connected. Implemented using async to support a high volume of connections.
## Main crates used
* [lapin](https://crates.io/crates/lapin) and [tokio-amqp](https://crates.io/crates/tokio-amqp) for the async AMQP implementation
* [warp](https://crates.io/crates/warp) for the websocket service
* [tokio](https://crates.io/crates/tokio) for the async runtime
## Things I learned
* Using lapin and warp
* Async closures
* Lazy statics
* The difference between `Fn` and `FnOnce`