Is it appropriate to use message queues for synchronous rpc calls via ajax

14,233

It's possible to perform RPC synchronous requests with RabbitMQ. Here it's explained very well, with its drawback included! So it's considered an acceptable architecture. Discouraged, but acceptable whenever the synchronous response is mandatory.

As a possible counter-effect is that adding RabbitMQ in the middle, you will add some latency to the solution.

However you have the possibility to gain in terms of reliability, flexibility, scalability,...

Share:
14,233
nickbw
Author by

nickbw

Updated on June 05, 2022

Comments

  • nickbw
    nickbw almost 2 years

    I have a web application that uses the jquery autocomplete plugin, which essentially sends via ajax a request containing text that has been typed into a textbox to our web server, once the web server receives this request, it is then handed off to rabbitmq.

    I know that we do get benefits from using messaging, but it seems like using it for blocking rpc calls is a misuse and that something like WCF is far more appropriate in this instance, is this the case or is it considered acceptable architecture?