Simple (or Streaming) Text-Oriented Message Protocol (STOMP) over WebSocket provides straightforward mapping from a STOMP frame to a JavaScript object. WebSocket is the fastest protocol, but it is still not supported by all browsers. Such browsers have problems supporting proxies and protocol handling. It will take a while to get wide support by all browsers; meanwhile, we need to find some substitute or real-time solution. SockJS
supports the STOMP protocol for communicating with any message broker from the scripting languages, and is an alternative to AMQP. STOMP is lightweight and easy to implement, both on the client as well as server side. It comes with a reliable capability to send a single message and then disconnect or consume all messages from the destination. It defines the following different frames, which are mapped to the WebSocket frames:
- CONNECT: This connects the client to the server
- SUBSCRIBE: This is used for listening to the given destination
- UNSUBSCRIBE: This is used...