A Rust implementation of RSMQ (Redis Simple Message Queue).
Add this line to your application's Cargo.toml:
[dependencies]
rsmq = "*"
extern crate rsmq;
use rsmq::*;
fn main() {
let rsmq = Rsmq::new("redis://127.0.0.1/").expect("Can't connect to Redis");
let qopts = QueueOpts {
qname: "my-queue".into(),
vt: 60,
delay: 120,
maxsize: 3000,
};
rsmq.create_queue(qopts).expect("queue creation failed");
let qs = rsmq.list_queues().expect("Nope, no listing for you");
println!("List queues: {:?}", qs);
rsmq.delete_queue("my-queue").expect("q deletion failed");
}
- Fork it ( http://github.com/dvdplm/rsmq-rust )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request