Skip to content
High Availability AMQP Messaging With Redundant Queues
Ruby Cucumber HTML Shell
Latest commit 4e64cca @skaes skaes updated doc
Failed to load latest commit information.
bin moved the redis_configuration_server and client to a beetle executable
doc updated doc
etc New redis version will actually create a file named "stdout" (not sta…
examples Preserve RabbitMQ 2.x requeueing behaviour via dead letter queues
features Fix cucumber tests in Ruby 2.2
lib New gem version 0.4.2
script
test Fail hard on missing master file
tmp Added tmp directory, we need it for running the tests
.gitignore ignore redis dump
.travis.yml stop using an ancient bundler on travis
DEAD_LETTERING.md Preserve RabbitMQ 2.x requeueing behaviour via dead letter queues
Gemfile updated some testing gems
MIT-LICENSE started documentation
README.rdoc updated docs
REDIS_AUTO_FAILOVER.rdoc
RELEASE_NOTES.rdoc New gem version 0.4.2
Rakefile improve cucumber tests (and pin daemons lib to 1.1.9)
beetle.gemspec updated some testing gems

README.rdoc

Beetle

High Availability AMQP Messaging with Redundant Queues

About

Beetle grew out of a project to improve an existing ActiveMQ based messaging infrastructure. It offers the following features:

  • High Availability (by using multiple message broker instances)

  • Redundancy (by replicating queues)

  • Simple client API (by encapsulating the publishing/ deduplication logic)

More information can be found on the project website.

Usage

Configuration

# configure machines

Beetle.config do |config|
  config.servers = "broker1:5672, broker2:5672"
  config.redis_server = "redis1:6379"
end

# instantiate a beetle client

b = Beetle::Client.new

# configure exchanges, queues, bindings, messages and handlers

b.configure do |config|
  config.queue :test
  config.message :test
  config.handler(:test) { |message| puts message.data }
end

Publishing

b.publish :test, "I'm a test message"

Subscribing

b.listen_queues

Examples

Beetle ships with a number of example scripts.

The top level Rakefile comes with targets to start several RabbitMQ and redis instances locally. Make sure the corresponding binaries are in your search path. Open four new shell windows and execute the following commands:

rake rabbit:start1
rake rabbit:start2
rake redis:start1
rake redis:start2

Prerequisites

To set up a redundant messaging system you will need

  • at least 2 AMQP servers (we use RabbitMQ)

  • at least one Redis server (better are two in a master/slave setup, see REDIS_AUTO_FAILOVER.rdoc)

Test environment

For testing purposes, you will need a MySQL database with the database `beetle_test` created. This is needed to test special cases in which Beetle handles the connection with ActiveRecord:

mysql -e 'create database beetle_test;'

You also need a Redis instance running. The default configuration of Redis will work:

redis-server

Gem Dependencies

At runtime, Beetle will use

For development, you'll need

For tests, you'll need

Authors

Stefan Kaes, Pascal Friederich, Ali Jelveh, Bjoern Rochel and Sebastian Roebke.

You can find out more about our work on our dev blog.

Copyright © 2010-2015 XING AG

Released under the MIT license. For full details see MIT-LICENSE included in this distribution.

Something went wrong with that request. Please try again.