Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

AMQP Participant/Listener pair for ruote

branch: rework
README.md

ruote-amqp

ruote-amqp is a set of classes that let a ruote engine publish and/or receive messages over AMQP.

The most common use case is publishing workitems for processing by AMQP consumers and eventually receiving them back to resume the flow.

Another use case would be to listen on an AMQP queue for workflow launch requests.

Listening for arbitrary AMQP messages before resuming a flow (ambush/alert) is also possible.

usage

Ruote::Amqp::Participant

Publishing messages

  $dashboard.register(
    :toto,
    Ruote::Amqp::Participant,
    :exchange => [ 'direct', '' ],
    :routing_key => 'alpha')

  pdef = Ruote.define do
    toto
  end

  $dashboard.launch(pdef)

  # ...

Ruote::Amqp::Receiver

Receiving messages.

# TODO

Ruote::Amqp::AlertParticipant

Ambushing messages from a process definition.

# TODO

requirements

install

Please be sure to have read the requirements section above

gem install ruote-amqp

or via your Gemfile (thanks bundler).

tests / specs

To run the tests you need the following requirements met, or the testing environment will fail horribly (or simply get stuck without output).

RabbitMQ vhost

The tests use dedicated vhost on a running AMQP broker. To configure RabbitMQ you can run the following commands (the RabbitMQ server must be running):

$ rabbitmqctl add_vhost ruote-test
$ rabbitmqctl add_user ruote ruote
$ rabbitmqctl set_permissions -p ruote-test ruote '.*' '.*' '.*'

or by running:

$ rake prepare

If you need to change the AMQP configuration used by the tests, edit the +spec/spec_helper.rb+ file.

daemon-kit

Kenneth Kalmer, the original author of the ruote-amqp gem is also the author of DaemonKit a library/toolbox for building daemons.

It used to be the preferred way to wrap remote participants (as daemons) but lately Kenneth hasn't had much time for support. It's still full of excellent ideas.

license

MIT, see LICENSE.txt

Something went wrong with that request. Please try again.