Build Status docs.rs Crates.io Crates.io Crates.io

Memphis Rust Client

This is an unofficial client for Memphis, written in Rust. This is a work in progress and is not yet ready for production use.

Features

Installation

Add the following to your Cargo.toml file:

toml [dependencies] memphis-rust-community = "0.1.0"

Usage

```rust use memphisrustcommunity::memphisclient::MemphisClient; use memphisrustcommunity::consumer::memphisconsumer_options::MemphisConsumerOptions;

[tokio::main]

async fn main() { let client = MemphisClient::new("localhost:6666", "root", "memphis").await.unwrap(); let consumeroptions = MemphisConsumerOptions::new("my-station", "my-consumer"); let mut consumer = client.createconsumer(consumer_options).await.unwrap();

consumer.consume().await.unwrap();
tokio::spawn(async move {
    loop{
        let msg = consumer.message_receiver.recv().await;
        // Do something with the message
        break;
    }
});

} ```