kooka_lib_messenger

Crates.iokooka_lib_messenger
lib.rskooka_lib_messenger
version0.1.2
sourcesrc
created_at2018-08-07 12:05:26.200919
updated_at2019-05-29 01:12:55.51379
descriptionCommunication between services by using Nats
homepage
repositoryhttps://bitbucket.org/green__team/lib_messenger/
max_upload_size
id78017
size6,157
Olex Tkachuk (olex-green)

documentation

README

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);
    }
}
Commit count: 0

cargo fmt