Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
EventMachine EventBus
Ruby
branch: develop

This branch is 9 commits ahead of 3Crowd:develop

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
autotest
examples
lib
spec
.gitignore
.rvmrc
.travis.yml
Gemfile
Gemfile.lock
LICENSE.txt
README.md
Rakefile
emeb.gemspec

README.md

EventMachine EventBus (EMEB)

The EventMachine EventBus (herein, EMEB) provides a standard framework for the creation of evented message oriented applications utilizing the EventMachine framework. If you are familiar with the AMQP messaging system model, then EMEB will be very familiar to you. Note that while it borrows heavily from the AMQP object model it does not always adhere to the AMQP standard, so please do read the documentation even if you are very familiar with AMQP.

Installation

  • Installation from RubyGems

    gem install emeb

  • Installation using bundler (Gemfile)

    gem 'emeb'

Quick Start

A simple example follows (contained in a file called ~/example.rb):

EM.start do

  # EMEB::on is a shortcut method which binds a new anonymous queue the 
  # application default vhost on the application default topic exchange.
  EMEB.on :topic => 'amazing.stuff.*' do |event|
    puts "A most enjoyable experience: ' + event.data
  end

  with_data = 'event occurance'
  EMEB.publish :topic => 'amazing.stuff.here', :data => with_data

  with_data += ': sequalea'
  EMEB.publish :topic => 'even.more.amazing.stuff.here', :data => with_data

  EM.stop
end

Will yield the following output:

$> ruby example.rb
A most enjoyable experience: event occurance
$>

Travis CI

Travis-CI

Something went wrong with that request. Please try again.