5

Is it possible to setup RabbitMQ Web STOMP connection without SockJS library?

I have played around with rabbitmq-web-stomp plugin without a success as the initial response generated by the server is Welcome to SockJS! (which is obviously not a STOMP based message).

Is SockJS really required? What does it bring into the game (besides legacy browser support)?

Pavel Horal
  • 17,782
  • 3
  • 65
  • 89

1 Answers1

6

SockJS protocol does support raw WebSocket clients under /websocket path.

Any SockJS server complying with 0.3 protocol does support a raw WebSocket url. The raw WebSocket url for the test server looks like:

ws://localhost:8081/echo/websocket

You can connect any WebSocket RFC 6455 compliant WebSocket client to this url.

This is supported by Rabbit's implementation as well. So the default endpoint is: http://example.com:15674/stomp/websocket.

Pavel Horal
  • 17,782
  • 3
  • 65
  • 89
  • 4
    RabbitMq web stomp doesn't support websocket PING frame message — server doesn't send PONG frame back. It is the reason, why client.heartbeat.outgoing and client.heartbeat.incoming are set to 0 (see official examples — "SockJS does not support heart-beat: disable heart-beats"). So, your connection will be terminated by proxy or by stomp-websocket library (if you don't set client.heartbeat.* to 0). – develar Mar 31 '15 at 10:29