Search code examples
javawebsocketmessagingstomp

Are websocket subprotocols like WAMP, STOMP, etc. compatible with each other?


I am looking to leverage WebSockets. I will expose the WebSockets and different client applications will be able to listen to notifications via these WebSockets.

I am planning to use STOMP, but my clients have different preferences as their applications are already using different sub-protocols. I was wondering if there is any cross support available from one subprotocol to another?


Solution

  • In short, no. WAMP and STOMP are not compatible with each other.

    The STOMP specification has no "cross support" for anything else. In fact, I've never heard of any widely-used messaging protocol with "cross support" for anything else.

    That said, many message brokers support multiple messaging protocols (e.g. ActiveMQ supports STOMP, AMQP, MQTT - all of which can be used over WebSockets) so you can send messages with one protocol and consume them with another protocol. However, I don't know of any widely-used message brokers which support WAMP.