Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REST API for rabbitmq

Is there a way how can I send data to RabbitMQ from $.ajax?

My application is made up of several thousands web-clients (written on js) and WCF REST service and now I am trying to figure out how can I create a scalable point for my application. The idea is to have a rabbitmq instance which receives messages from js clients placed on one side, and instances of WCF Workflow Services which are taking pending messages from the queue.

I understand that AMQP and HTTP is pretty different things.

So the question is - is there a REST interface for rabbit mq or some sort of gateway for it

like image 351
madcyree Avatar asked Apr 09 '12 22:04

madcyree


2 Answers

There are lots of 3rd-party HTTP plugins listed on RabbitMQ's developer tools page, and they also offer an experimental JSON-RPC plugin that allows for AMQP over HTTP access.

You should also take a look at RabbitJS and SockJS to see what the Rabbit team is doing to bring messaging to the worlds of node.js and WebSockets, respectively.

like image 50
Brian Kelly Avatar answered Sep 19 '22 14:09

Brian Kelly


The RabbitMQ REST API documentation for the 3.4.3 release can be found here:

http://hg.rabbitmq.com/rabbitmq-management/raw-file/rabbitmq_v3_4_3/priv/www/api/index.html

It also allows to publish messages besides management tasks.

Important note from the linked documentation:

Please note that the publish / get paths in the HTTP API are intended for injecting test messages, diagnostics etc - they do not implement reliable delivery and so should be treated as a sysadmin's tool rather than a general API for messaging.

like image 21
mjn Avatar answered Sep 20 '22 14:09

mjn