Skip to content
High Availability AMQP Messaging With Redundant Queues
Ruby HTML Cucumber Shell
Latest commit 2ad19d8 Jun 10, 2016 @skaes skaes committed on GitHub Merge pull request #36 from Calamari/fix_typo
fix small typo in comment of beetle/configuration
Failed to load latest commit information.
bin moved the redis_configuration_server and client to a beetle executable Jun 11, 2010
doc updated doc Feb 12, 2016
etc renamed rake redis:start{1,2} to redis.start:{master,slave} Mar 3, 2016
examples fixed the "message processed twice after restarts" problem Feb 14, 2016
features Add --force option to redis configuration daemons Jun 9, 2016
lib Merge pull request #36 from Calamari/fix_typo Jun 10, 2016
script respect my access rights Jan 12, 2013
test we don't need to create a database for activerecord Jun 4, 2016
tmp renamed rake redis:start{1,2} to redis.start:{master,slave} Mar 3, 2016
.gitignore
.travis.yml run integration tests on travis Jun 6, 2016
DEAD_LETTERING.md Preserve RabbitMQ 2.x requeueing behaviour via dead letter queues Jul 14, 2015
Gemfile Add --force option to redis configuration daemons Jun 9, 2016
MIT-LICENSE started documentation Feb 17, 2010
README.rdoc updated docs Jul 16, 2015
REDIS_AUTO_FAILOVER.rdoc
RELEASE_NOTES.rdoc
Rakefile renamed rake redis:start{1,2} to redis.start:{master,slave} Mar 3, 2016
beetle.gemspec Add --force option to redis configuration daemons Jun 9, 2016

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.