On Wed, 30 Jan 2019, at 13:10, Vinayakumar Chikkadi wrote:
> Hi all,
>
> I am new to this group as well as new to the rabbitmq usage.
Welcome Vinayakumar.
> My query is regarding some use case like sending very large image file over
> the HTTP protocol with image data in the JSON format over rabbitmq.
RabbitMQ uses a binary protocol, AMQP - not HTTP. It treats the message
contents as opaque data. In your case you may get significantly better
throughput and performance just by sending the raw data and avoiding
needing to encode things at each end, depends on what you have at each
end.
You can add message headers such as content-type and content-encoding
to allow the consumer to manage how to process certain messages.
https://www.rabbitmq.com/tutorials/amqp-concepts.html is useful.
> Does it has any limitations on size for sending the image file?
Depends on your rabbitmq server and how you manage it. In practical
terms a message still needs to be moved from network -> RAM, and
potentially again out to disk if you use lazy queues. Too many messages
waiting in the queue will either consume too much RAM or make
your system continually try to write to disk.
I would suggest you write a simple producer and consumer following
the tutorials
https://www.rabbitmq.com/tutorials/ and find what works
for your use case.
> Does it uses the message queue to push the image file to the web server?
You will have to decide how to move things around, rabbitmq only has
queues and exchanges. A small bit of code may be needed to do what
you need.
A+
Dave