Giter Club home page Giter Club logo

emeb's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.