Reputation: 1457
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
Upvotes: 10
Views: 42611
Reputation: 36654
The RabbitMQ REST API documentation for the 3.7.4 release can be found here:
https://rawcdn.githack.com/rabbitmq/rabbitmq-management/v3.7.4/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.
Upvotes: 3
Reputation: 19295
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.
Upvotes: 8
Reputation: 13628
Yes. The rabbitmq_jsonrpc_channel plugin which you can research at RabbitMQ Plugins
It looks as though it provides AMQP over HTTP with JSON.
Upvotes: 0