Giter Club home page Giter Club logo

bunny's Introduction

About bunny

Bunny is a synchronous AMQP client. It supports Ruby 1.9.2, 1.8.7, Ruby Enterprise Edition and JRuby. Protocol-wise, Bunny supports AMQP 0.9.1 and 0.8. Support for AMQP 0.8 will be dropped in the next version of Bunny (0.8) because most of popular AMQP brokers such as RabbitMQ have already stopped or are planning to stop supporting it in the near future.

Bunny is based on a great deal of useful code from the amqp Ruby gem and Carrot.

You can use Bunny to:

  • Create and delete exchanges
  • Create and delete queues
  • Publish and consume messages

Quick Start

require "bunny"

b = Bunny.new(:logging => true)

# start a communication session with the amqp server
b.start

# declare a queue
q = b.queue("test1")

# declare default direct exchange which is bound to all queues
e = b.exchange("")

# publish a message to the exchange which then gets routed to the queue
e.publish("Hello, everybody!", :key => 'test1')

# get message from the queue
msg = q.pop[:payload]

puts "This is the message: " + msg + "\n\n"

# close the connection
b.stop

โ€ฆ or just:

require "bunny"

# Create a direct queue named "my_testq"
Bunny.run { |c| c.queue("my_testq") }

Please see the examples directory for additional usage information.

AMQP Resources

  • AMQP 0.9.1 model explained โ€“ Introductory explanation of the AMQP v0.9.1 specification with particular reference to RabbitMQ

Links

bunny's People

Contributors

celldee avatar michaelklishin avatar ali-graham avatar aymerick avatar eric avatar xaviershay avatar chaptastic avatar danielsdeleo avatar fazibear avatar nedcampion avatar

Stargazers

Mario F avatar

Watchers

Mario F avatar James Cloos avatar  avatar

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.