github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

assaf / reliable-msg

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 13
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Click here to lend your support to: reliable-msg and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.
  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Made to work with UUID 2.0. 
assaf (author)
Tue Mar 24 17:28:29 -0700 2009
commit  81e4b5eb4723d69814c9311d94afa4c53805968a
tree    3ef3eda8c075279ba99da4a9678a77aaa01c5dfb
parent  9450b2d04ee71dac12542f217c678cfdd7d021c7
reliable-msg /
name age
history
message
file .gitignore Loading commit data...
file CHANGELOG
file MIT-LICENSE
file README.rdoc
file Rakefile
directory bin/
directory lib/
file reliable-msg.gemspec
directory test/
README.rdoc

Reliable Messaging for Ruby

This package provides reliable messaging and persistent queues for building asynchronous applications in Ruby.

This release provides the following features:

  • Simple API.
  • Transction processing.
  • Disk-based and MySQL message stores.
  • Best effort, repeated and once-only delivery semantics.
  • Priority queues, message expiration, dead-letter queue.
  • Message selectors.
  • Local and remote queue managers using DRb.

Download

The latest version of Reliable Messaging can be found at

  • rubyforge.org/projects/reliable-msg/

Installation

You can download the sources directly, or install the GEM package (recommended) with

  gem install reliable-msg

To create the configuration file and queues for use with the disk-based message store

  queues install disk [<path>]

The optional path argument specifies the directory in which queue index and messages are store. The default directory is queues.

To create the configuration file and queues for use with the MySQL message store

  queues install mysql <host> <user> <password> <database>
         [--port <port>] [--socket <socket>] [--prefix <prefix>]

You must have MySQL libraries installed in order to use this message store, either native MySQL libraries or the Rails pure-Ruby adapter. It uses the supplied connection properties and creates tables in your database using the specified prefix. The default prefix is reliable_msg_.

For example

  queues install mysql localhost my-db user secret

Configuration file

The installation process creates a configuration file (queues.cfg) located in the same directory as the library. You can specify a different location for the configuration file using the option -c of —config.

When you use the queue manager, it looks for a specified configuration file, or if no configuration file is specified it looks for the queues.cfg file, first in the local directory and then in the installation directory. If no file exists, it will create a default one to use the disk-based message store.

UUID state file

Reliable messaging requires a UUID generator that is able to create universally unique identifiers. The UUID generator uses the uuid.state file to hold a unique machine identifier and a rolling sequence number.

On the first usage, a uuid.state file is created in the installation directory. An existing state file will be used if one exists in the local directory or the installation directory.

The unique machine identifier is obtained from one of the network card’s MAC address on your machine, using either the ipconfig or ifconfig commands. If no MAC address can be found, or you want to pick a specific MAC address, create a uuid.state file manually.

Simple Example

Start the queue manager as a standalone server

  queues manager start

Use the queue API in your application

  require 'reliable-msg'

  queue = Queue.new 'my-queue'
  queue.put obj
  msg = queue.get
  assert msg.object == obj

Stop the queue manager

  queues manager stop

License

This package is licensed under the MIT license and/or the Creative Commons Attribution-ShareAlike.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server