REST API for rabbit

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

My application consists of several thousand web clients (written in js) and the WCF REST service, and now I'm trying to figure out how to create a scalable point for my application. The idea is to have a rabbitmq instance that receives messages from js clients hosted on one side and WCF Workflow Services instances that receive pending messages from the queue.

I understand that AMQP and HTTP are completely different things.

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

+6
source share
3 answers

There are many third-party HTTP plugins listed on the developer's tools page, as well as an experimental JSON-RPC plugin that allows you to use AMQP through HTTP access.

You should also take a look at RabbitJS and SockJS to find out what Rabbit's team is doing to provide messaging with the worlds of node.js and WebSockets respectively.

+4
source

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

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

It also allows you to publish messages in addition to management tasks.

Important note from related documentation:

Please note that the publishing / receiving paths in the HTTP API are for inputting test messages, diagnostics, etc. - they do not implement reliable delivery and, therefore, should be considered more as a sysadmin tool than a common messaging API.

+1
source

Yes. The rabbitmq_jsonrpc_channel plugin that you can explore in the RabbitMQ plugins

It looks like it provides AMQP over HTTP using JSON.

0
source

Source: https://habr.com/ru/post/912795/


All Articles