Talk about easy. The new release (1.1.0) adds two new method to your controller. Use queue to create a new Queue object for putting/getting messages in queue, or topic to create a new Topic object. Here’s what it looks like in action, a simple action that puts the message ‘Hello world’ in a queue:
require_gem 'reliable-msg' class ApplicationController < ActionController::Base queue :my_queue def index my_queue.put "Hello world" render :text => "Put message 'Hello world' in queue" end end
And if you’ve just noticed, the new release adds topics for pub/sub style of messaging, and new and improved selectors.