Skip to content
Newer
Older
100644 52 lines (40 sloc) 1.71 KB
be4be38 @jbrisbin Initial commit
authored
1 # Riak RabbitMQ postcommit hook
2
3 This is a postcommit hook that sends entries into a RabbitMQ broker using the
4 Erlang AMQP client.
5
6 You set this module/function as your postcommit hook using whatever tools you're
7 used to. Your bucket properties should look something like this:
8
9 {
10 "props":{
11 "postcommit":[{"mod":"riak_rabbitmq","fun":"postcommit_send_amqp"}],
12 ... other props ...
13 }
14 }
15
16 ### Installation
17
0d3e3ab @jbrisbin Tweaked README, cleaned formatting
authored
18 I haven't had time to create a binary download yet. In the interest of early
19 adoption, you're free to build and install from source. But if you can wait
20 a day or two, I'll have a binary build up. :)
21
be4be38 @jbrisbin Initial commit
authored
22 To install this module, clone the source, build, then symlink the required
23 dependencies into your Riak install:
24
25 git clone git://github.com/jbrisbin/riak-rabbitmq-commit-hooks.git
26 cd riak-rabbitmq-commit-hooks
27 ./rebar get-deps
28 make
29 [...wait for a long time while spidermonkey builds...]
30 cd $RIAK_LIBS
31 ln -s $BUILD_DIR riak_rabbitmq-0.1.0
32 ln -s $BUILD_DIR/deps/amqp_client amqp_client-2.4.1
33 ln -s $BUILD_DIR/deps/rabbit_common rabbit_common-2.4.1
34
35 This should expose the module and the right dependencies to your Riak server so
36 that your postcommit hook will actually work.
37
38 ### Configuration
39
40 To tell the commit hook where to send your entry in the form of an AMQP message,
41 you can pass special metadata properties to influence the commit hook's behaviour.
42 The list of acceptable properties is pretty self-explanatory:
43
44 * `X-Riak-Meta-AMQP-Exchange`
45 * `X-Riak-Meta-AMQP-Routing-Key`
46 * `X-Riak-Meta-AMQP-Host`
47 * `X-Riak-Meta-AMQP-Port`
48 * `X-Riak-Meta-AMQP-VHost`
49 * `X-Riak-Meta-AMQP-User`
50 * `X-Riak-Meta-AMQP-Password`
51
52 This utility is Apache licensed, just like Riak.
Something went wrong with that request. Please try again.