Skip to content

nosolopau/amqp_notifier

Repository files navigation

AmqpNotifier

AmqpNotifier is a helper library to wrap Qusion with the AMQP gem.

Installation

Run this command:

gem install amqp-notifier

If you want to get the lastest version, add:

gem "amqp_notifier", :git => "git://github.com/nosolopau/amqp_notifier.git"

To use this version, add this to your Gemfile:

gem "amqp_notifier", "0.0.3", :git => "git://github.com/nosolopau/amqp_notifier.git"

Use

AmqpNotifier defines a method for publishing and another for subscription:

Publish

AmqpNotifier.new('exchange', 'queue').publish('routing_key', 'message')

Subscribe

a = AmqpNotifier.new('exchange', 'queue').subscribe('routing_key') do |info, message|
  puts message
end

About

A helper class to work with Qusion and AMQP

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages