Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stomp.js is out of date and no longer maintained - which Stomp client to use with Spring Websockets?

Tags:

I found it surprising that the current documentation for the Spring WebSocket Support directs users to use stomp.js for their client-side JavaScript implementation.

This project, on the ReadMe on it's GitHub page, says:

This project is no longer maintained.

If you encounter bugs with it or need enhancements, you can fork it and modify it as the project is under the Apache License 2.0.

The repository hasn't had any commits since September 2015 (which was just to add the above to the ReadMe), and no code commits since December 2014, so it has effectively been abandoned for the past 2 years.

I am unsure which of the 284 forks of the repository would be a stable and up-to-date version of the library, and there seems to be no viable alternative from a Google search.

Could someone please recommend a stable alternative that could be used instead?

Ideally my hope is the Spring team could provide some direction about the right client library to use with their STOMP support.

like image 824
rikoe Avatar asked Dec 13 '16 10:12

rikoe


People also ask

What is STOMP over WebSocket?

STOMP is derived on top of WebSockets. STOMP just mentions a few specific ways on how the message frames are exchanged between the client and the server using WebSockets. Long Answer. WebSockets. It is a specification to allow asynchronous bidirectional communication between a client and a server.

Is STOMP deprecated?

This project is no longer maintained. If you encounter bugs with it or need enhancements, you can fork it and modify it as the project is under the Apache License 2.0.

Does spring boot support WebSocket?

Spring Boot includes the spring-WebSocket module, which is compatible with the Java WebSocket API standard (JSR-356). Implementing the WebSocket server-side with Spring Boot is not a very complex task and includes only a couple of steps, which we will walk through one by one.

How do you STOMP in WebSocket?

You need to start a STOMP server with support for WebSocket (using for example HornetQ). Click on the Connect button to connect to the server and subscribe to the /queue/test/ queue. You can then type messages in the form at the bottom of the page to send STOMP messages to the queue.

What is Stomp JS?

STOMP.js This library provides a WebSocket over STOMP client for Web browser or node.js applications. Introduction This library allows you to connect to a STOMP broker over WebSocket. This library supports full STOMP specifications and all current protocol variants.

Is it possible to use stomp over WebSockets?

Most popular messaging brokers support STOMP and STOMP over WebSockets either natively or using plugins. In general JavaScript engines in browsers are not friendly to binary protocols, so using STOMP is a better option because it is a text oriented protocol.

What is Stomp protocol?

Simple Text Oriented Messaging Protocol ( STOMP ), is a simple text-based protocol, designed for working with message-oriented middleware (MOM). Any STOMP client can communicate with any STOMP message broker and be interoperable among languages and platforms. So, why using STOMP if we are already using WebSocket?

How do I use the Stomp object?

Read along to learn how to use the Stomp object. STOMP JavaScript clients will communicate to a STOMP server using a ws:// URL. To create a STOMP client JavaScript object, you need to call Stomp.client (url) with the URL corresponding to the server's WebSocket endpoint:


2 Answers

Please check https://github.com/stomp-js/stompjs (@stomp/stompjs at npm). It is based on the original, however fixes known issues, supports auto reconnect, binary data, callbacks. Written in Typescript and distributed as UMD (usable from Node as well as browsers).

It also has variants for RxJS (https://github.com/stomp-js/rx-stomp) and Angular (https://github.com/stomp-js/ng2-stompjs).

This is actively maintained.

like image 29
Deepak Kumar Avatar answered Oct 06 '22 16:10

Deepak Kumar


I've been wondering about this as well, but haven't been able to find anything concrete. The closest I've come across has been webstomp-client:

https://github.com/JSteunou/webstomp-client

It claims to be a fork of the original stomp.js, and it looks like it's actively maintained.


Unrelated to the question, but related to what I've been working on recently, I also found a fork of webstomp-client that implements an RxJS client as well; posting some links in case it's useful to someone in the future.

https://github.com/Clanrat/webstomp-client

https://github.com/Clanrat/webstomp-client/blob/master/src/rxclient.js

like image 156
Hristo Avatar answered Oct 06 '22 16:10

Hristo