[rabbitmq-discuss] RabbitMQ Webhooks plugin on Github

Jon Brisbin jon at jbrisbin.com
Thu Aug 26 22:14:39 BST 2010


I just pushed the first alpha of a webhooks plugin for RabbitMQ to Github:

http://github.com/jbrisbin/rabbitmq-webhooks

This plugin takes a message from a configurable queue and sends it to a REST URL using whatever method you tell it to (PUT|POST|DELETE|etc...).

I haven't yet added the throttling and "wait until" scheduling I plan to add. This will let you interact with Google AppEngine or any other cloud provider by exposing REST services to asynchronous messaging.

The problems I'm trying to solve are:

In Google AppEngine, for example, you don't know how many of your web applications will be running. Some might die off and others might be started at any time to handle the traffic load. If you start consumers within the context of your web application, you will get fewer or more consumers depending on the number of web application instances running in the cloud. This is not always a bad thing, but you don't have any control over that process and I'm a control freak. :)

I'd like to be able to have asynchronous "triggers" for CouchDB that do things automatically and when I want them to.

This also allows greater parallelism because, looking again at the cloud provider scenario, if I wanted to dump 10,000 requests on my cloud application, I could, because the cloud that powers my web application is designed to handle that kind of elastic load. I can't say the same for standard AMQP consumers. I would have to run them on something like EC2 and manually fire up instances to get greater parallelism. This could be pretty interesting for map/reduce jobs on Internet scale. :)

This plugin is pretty configurable already but will be more so as time goes on. Message headers get transferred to HTTP request headers automatically. The contentType message property becomes the Content-Type HTTP header. I will eventually let messages override everything on per-message basis: url, method, etc...

I built against a checkout of the server, but we're close enough to the 2.0 release that it should Just Work by dumping the .ez files into your 2.0 plugins directory. I'd love to know if this works in 1.8, too. I haven't even tried. I'm not really doing anything special, so I can't imagine it would be hard to make it backwards-compatible.

Let me know what you think!

J. Brisbin
http://jbrisbin.com/






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100826/19329f76/attachment.htm>


More information about the rabbitmq-discuss mailing list