4 releases (2 breaking)
Uses old Rust 2015
0.2.1 | Jan 5, 2018 |
---|---|
0.2.0 | Dec 8, 2017 |
0.1.0 | Dec 3, 2017 |
0.0.1 | Dec 2, 2017 |
#68 in #delay
16KB
350 lines
A Rust implementation of RSMQ (Redis Simple Message Queue).
Installation
Add this line to your application's Cargo.toml:
[dependencies]
rsmq = "*"
Usage
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");
}
Contributing
- 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
Dependencies
~3.5–8MB
~85K SLoC