mnetship / ratsio

NATS & NATS Streaming Server client library for Rust
MIT License
50 stars 22 forks source link

A simple tutorial #4

Open codecandy2015 opened 5 years ago

codecandy2015 commented 5 years ago

Hi, I am new to RUST, I have to use NATS in my project. I am learning how Futures are working .. unfortunately, it is so hard to understand your example code.

is there some step by step tutorial that you have perhaps ?. I can am happy to write one if you like, however, I have trouble understanding it. I am trying to see how to

  1. connect
  2. subscribe
  3. publish
  4. disconnect

something like .- http://www.steves-internet-guide.com/into-mqtt-python-client/

in the example provided pointing to tests.. it is all chained in futures.. how could one write it more modular that it prints a msg when subscribed without killing the runtime thread ?!.

if your lib is stable and largely used, such a tutorial an benefit enormously

thanks Candy