Browse files

Add README file.

  • Loading branch information...
1 parent 5cc49d0 commit 8747eafe62924a929fb0624931d970b7f7042107 @tonyg committed Jul 11, 2009
Showing with 82 additions and 0 deletions.
  1. +82 −0
  2. BIN doc/rabbithub-example.png
@@ -0,0 +1,82 @@
+# PubSub-over-Webhooks with RabbitHub
+[RabbitHub][gitrepo] is an implementation of
+[PubSubHubBub][pshb_project], a straightforward pubsub layer on top of
+plain old HTTP POST - pubsub over Webhooks. RabbitHub provides an
+HTTP-based interface to [RabbitMQ][].
+It gives every AMQP exchange and queue hosted by a RabbitMQ broker a
+couple of URLs: one to use for delivering messages to the exchange or
+queue, and one to use to subscribe to messages forwarded on by the
+exchange or queue. You subscribe with a callback URL, so when messages
+arrive, RabbitHub POSTs them on to your callback. For example,
+ - <> is the
+ URL for delivering messages to the "" exchange on the
+ public test instance of RabbitMQ, and
+ - <> is
+ the URL for subscribing to messages from the (hypothetical) queue
+ "some_queue_name" on the broker.
+The symmetrical .../subscribe/x/... and .../endpoint/q/... also exist.
+The [PubSubHubBub protocol][spec] specifies some RESTful(ish)
+operations for establishing subscriptions between message sources
+(a.k.a "topics") and message sinks. RabbitHub implements these
+operations as well as a few more for RESTfully creating and deleting
+exchanges and queues.
+While PubSubHubBub is written assuming Atom content, RabbitHub is
+content-agnostic (just like RabbitMQ): any content at all can be sent
+using RabbitHub's implementation of the PubSubHubBub protocol. Because
+RabbitHub is content-agnostic, it doesn't implement any of the
+Atom-specific parts of the PubSubHubBub protocol, including the "ping"
+operation that tells a PSHB hub to re-fetch content feeds.
+## Example: combining HTTP messaging with AMQP and XMPP
+Combining RabbitHub with the AMQP protocol implemented by RabbitMQ
+itself and with the other adapters and gateways that form part of the
+RabbitMQ universe lets you send messages across different kinds of
+message networks - for example, our public RabbitMQ instance,
+``, has RabbitHub running as well as the standard AMQP
+adapter, the [rabbitmq-xmpp][] plugin, and a bunch of our other
+experimental stuff, so you can do things like this:
+<img src="" alt="RabbitHub example configuration"/>
+ - become XMPP friends with `` (the XMPP adapter
+ gives each exchange a JID of its own)
+ - use PubSubHubBub to subscribe the sink
+ <> to some
+ PubSubHubBub source - perhaps one on the public Google PSHB
+ instance. (Note how the given URL ends in "x/pshb", meaning the
+ "pshb" exchange - which lines up with the JID we just became XMPP
+ friends with.)
+ - wait for changes to be signalled by Google's PSHB hub to RabbitHub
+ - when they are, you get an XMPP IM from `` with
+ the Atom XML that the hub sent out as the body
+Again, RabbitHub is content-agnostic, so the fact that Atom appears is
+an artifact of what Google's public PSHB instance is mailing out,
+rather than anything intrinsic in pubsub-over-webhooks.
+## HTTP messaging in the Browser
+In order to push AMQP messages out to a webpage running in a browser,
+try using <> to run a PubSubHubBub endpoint
+in a webpage - see for instance
+<> and its [associated
+Javascript]( for a simple
+prototype of the idea. It's also possible to build simple PSHB hubs in
+Javascript using the same tools.
+ [gitrepo]:
+ [pshb_project]:
+ [spec]:
+ [RabbitMQ]:
+ [rabbitmq-xmpp]:
BIN doc/rabbithub-example.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8747eaf

Please sign in to comment.