Skip to content

Commit

Permalink
Update version to 0.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
alex179ohm committed Feb 19, 2019
1 parent cde89ce commit 2554941
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nsq-client"
version = "0.1.6"
version = "0.1.7"
authors = ["Alessandro Cresto Miseroglio <alex179ohm@gmail.com>"]
description = """
Rust client for the NSQ realtime message processing system
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To use nsq-client, add this to your Cargo.toml:
```toml
[dependencies]
actix = "0.7"
nsq-client = "0.1.6"
nsq-client = "0.1.7"
```
### Create your first consumer
In order to use nsq-client you first need to create a Reader actor which implement Handler for the type of messages you want to receive
Expand Down Expand Up @@ -45,6 +45,9 @@ impl Actor for MyReader {
impl Handler<Msg> for MyReader {
fn handle(&mut self, msg: Msg, _: &mut Self::Context) {
println!("MyReader received {:?}", msg);
if let Ok(body) = String::from_utf8(msg.body) {
println!("utf8 msg: {}", body);
}
self.conn.do_send(Fin(msg.id));
}
}
Expand Down
3 changes: 3 additions & 0 deletions examples/reader/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ impl Handler<Msg> for MyReader {
// on identify
fn handle(&mut self, msg: Msg, _ctx: &mut Self::Context) {
println!("MyReader: {:?}", msg);
if let Ok(body) = String::from_utf8(msg.body) {
println!("utf8 msg: {}", body);
}
self.0.do_send(Fin(msg.id));
}
}
Expand Down

0 comments on commit 2554941

Please sign in to comment.