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

#50 in #message-queue

MIT license

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

  1. Fork it ( http://github.com/dvdplm/rsmq-rust )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Dependencies

~3–10MB
~100K SLoC