4

Im trying to decide if i will connection from web to rabbitmq through:

Solution 1. Rabbitmq stomp plugin + Rabbitmq web stomp plugin + Sockjs

Solution 2. Rabbitmq + nodejs through amqp nodejs plugin

Scenario:

a) I have one web app that subscribed a queue b) I have one java app that is writing to that queue c) I have one browser open with solution 1 and another one with solution 2

I tested both and what happens is that:

when i send sequential 10.000 messages, the solution 2 is much more quicker than the solution 1. The solution 2 never looses the connection. The solution 1 most of the times looses the connection in a random time (before it gets every message).

Questions:

  1. Is there any limitation configuration that i can update in solution 1?

  2. The problem of the solution 1 is due to: Sockjs? stomp plugin? stomp web plugin? all of them? I don't understand why if i add nodejs in the middle is much quicker than an embedded erlang plugin in rabbitmq (rabbitmq stomp /rabbitmq web stomp plugins).

    note: the stomp plugin or the stomp web plugin never dies. It always continue to listen on their ports.

  3. My easy explanation is that the browser cannot process so much sequential messages and nodejs does the manage of this pretty well and the rabbitmq web stomp does not. But is just a guess. Is this correct? If so, how can i solve it?

  4. The solution 1 shouldn't be better (in latency too) than the solution 2?

note: If i add in the publisher a difference of 5 milliseconds between the send of each message this problem disappears and the solution 1 performs like solution 2 (for 10.000 messages).

Thanks for any answer.

Best Regards,

Eduardo

Community
  • 1
  • 1
Eduardo Pinheiro
  • 3,409
  • 3
  • 30
  • 39

1 Answers1

0

You are comparing server (node.js) and borwser clients using different protocols, of course they are very different! STOMP protocol is useful to provide a lightweight and simple client-side for just a messaging, for example, browser JS.

I guess, Solution 1 may much vary on browser and type of connection SockJS uses: XHR, WebSocket, IFrame...

  • 1
    Hey I configured an rmq setup using node amqp in a websocket, but I'm having problems with receiving the messages that I publish to my exchanges. Can you please have a look at my post here https://stackoverflow.com/questions/70320526/aws-api-gateway-websocket-receives-messages-inconsistently, thanks! – Uche Ozoemena Dec 13 '21 at 15:31