This is an unofficial client for Memphis, written in Rust. This is a work in progress and is not yet ready for production use.
Add the following to your Cargo.toml
file:
toml
[dependencies]
memphis-rust-community = "0.2.0"
```rust use memphisrustcommunity::memphisclient::MemphisClient; use memphisrustcommunity::consumer::MemphisConsumerOptions; use memphisrust_community::station::MemphisStationsOptions;
async fn main() { let client = MemphisClient::new("localhost:6666", "root", "memphis").await.unwrap();
let station_options = MemphisStationsOptions::new("my-station");
let station = client.create_station(station_options).await.unwrap();
let consumer_options = MemphisConsumerOptions::new("my-consumer")
.with_generate_unique_suffix(true);
let mut consumer = station.create_consumer(consumer_options).await.unwrap();
let mut message_receiver = consumer.consume().await.unwrap();
tokio::spawn(async move {
loop {
let msg = message_receiver.recv().await;
// Do something with the message
break;
}
});
} ```
:whitecheckmark: Storage types
:warning: Schemaverse (WIP. Disabled by default via feature flag)
:x: Detach a schema
:whitecheckmark: Produce