Permalink
Browse files

Tweaked README to document ignore flag and per-bucket metadata config…

…uration
  • Loading branch information...
1 parent fa21d95 commit 512da890878bb701e0aa1113c3bb1bf784d5de5a @jbrisbin jbrisbin committed Apr 20, 2011
Showing with 28 additions and 10 deletions.
  1. +27 −9 README.md
  2. +1 −1 src/riak_rabbitmq.erl
View
@@ -50,12 +50,30 @@ To tell the commit hook where to send your entry in the form of an AMQP message,
you can pass special metadata properties to influence the commit hook's behaviour.
The list of acceptable properties is pretty self-explanatory:
-* `X-Riak-Meta-AMQP-Exchange`
-* `X-Riak-Meta-AMQP-Routing-Key`
-* `X-Riak-Meta-AMQP-Host`
-* `X-Riak-Meta-AMQP-Port`
-* `X-Riak-Meta-AMQP-VHost`
-* `X-Riak-Meta-AMQP-User`
-* `X-Riak-Meta-AMQP-Password`
-
-This utility is Apache licensed, just like Riak.
+* `X-Riak-Meta-Amqp-Exchange`
+* `X-Riak-Meta-Amqp-Routing-Key`
+* `X-Riak-Meta-Amqp-Host`
+* `X-Riak-Meta-Amqp-Port`
+* `X-Riak-Meta-Amqp-Vhost`
+* `X-Riak-Meta-Amqp-User`
+* `X-Riak-Meta-Amqp-Password`
+
+Alternatively, you can specify settings for an entire bucket by setting these metadata headers
+on an empty document at the key `AMQP-Meta` in the bucket you want to configure.
+
+This allows you to route entries in an entire bucket to specific RabbitMQ servers without
+your publisher having to know this information ahead of time.
+
+### Ignore Flag
+
+If you don't want a particular entry in a RabbitMQ-enabled bucket to actually be sent out
+(like if you're updating the `AMQP-Meta` entry), then set a metadata header with the name
+`X-Riak-Meta-Amqp-Ignore` to the string "true". The postcommit hook will see this flag and
+not actually send any message.
+
+### Deleted Entries
+
+If the update operation is a DELETE, the postcommit hook will set an AMQP message header named
+`X-Riak-Deleted` to "true". This way your application can distinguish between updates and deletes.
+
+This utility is Apache licensed, just like Riak.
View
@@ -12,7 +12,7 @@
-define(ROUTING_KEY, "X-Riak-Meta-Amqp-Routing-Key").
-define(HOST, "X-Riak-Meta-Amqp-Host").
-define(PORT, "X-Riak-Meta-Amqp-Port").
--define(VHOST, "X-Riak-Meta-Amqp-VHost").
+-define(VHOST, "X-Riak-Meta-Amqp-Vhost").
-define(USER, "X-Riak-Meta-Amqp-User").
-define(PASSWORD, "X-Riak-Meta-Amqp-Password").
-define(SKIP, "X-Riak-Meta-Amqp-Ignore").

0 comments on commit 512da89

Please sign in to comment.