#nats #messenger #lib #communication #service #client #kooka

kooka_lib_messenger

Communication between services by using Nats

12 releases

Uses old Rust 2015

0.1.2 May 29, 2019
0.1.1 May 12, 2019
0.1.0 Nov 28, 2018
0.0.9 Oct 27, 2018
0.0.3 Aug 13, 2018

#9 in #messenger

ISC license

7KB
117 lines

Kooka messenger

Communication between services by using Nats

Examples:

use kooka_lib_messenger::sender;

if let Err(e) = sender::produce_message(&data, &format!("{}.{}", SUBJECT_BASE, "test_request")) {
    println!("Failed producing messages: {}", e);
}
use kooka_lib_messenger::receiver;

match receiver::subscribe("some_route", None) {
    Ok(client) => {
        println!("Connected....");
        let message = receiver::consume_messages(client).unwrap();
        println!("Message: ", message);
    },
    Err(e) => {
        println!("Subscribe error: {}", e);
    }
}

Dependencies

~8–18MB
~236K SLoC