Clone this wiki locally
The Webhooks plugin for RabbitMQ is a plugin for connecting messages in your broker with web-accessible REST-style URLs. When the webhooks plugin is bound to an exchange, any messages it receives are relayed to an HTTP URL.
Building from Source
There are many advantages to using webhooks in addition to normal AMQP consumers:
A webhook running on a cloud provider that’s infinitely-scalable (like Google’s AppEngine) means your application can take advantage of the massive scaling capabilities of your cloud provider. Dump 1,000 messages into a webhook queue and get 1,000 HTTP calls to your configured REST API.
Note: You might want to be careful with this feature until the throttling code is fully implemented.
I have a use case where our applications are deployed to Java application servers. We don’t normally run special processes that execute our custom-built code. We write a simple web service using our in-house web framework that leverages the Groovy language. Our other developers neither know, nor have time or inclination to learn, another way of doing things. They know how to write a web service that is accessible via HTTP so that’s what they use.
Rather than force them to learn how to write standalone applications that have to be managed using some kludgey Bash script, use an entirely different set of tools, and have a completely different build path, our developers can write simple web services in Groovy using their IDE and have that code invoked whenever an event happens somewhere else in the cloud.
While AMQP clients exist for a lot of platforms and a lot of languages, there’s always cases where it would be nice to integrate with a RabbitMQ server without being limited to one of the platforms or languages that have a well-supported AMQP driver. I have a use case where a lot of our development (the majority of it, in fact) is done in C++ on WIN32 boxes running our Point of Sale system. This means no .NET, just Boost. Our developers are also using older versions of VisualStudio. Blame it on the economy. Since there is no C++ AMQP client for RabbitMQ that we could successfully build with our projects, our developers have not been able to integrate with us yet. With webhooks, I’m one step closer to getting them integrated into our asynchronous messaging domain (when I give them easy publish capability, I’ll have the makings of a full-service messaging infrastructure for our C++ code).