The Stomp module provides you with a client interface for interacting with STOMP messaging brokers.
Questions tagged [stompjs]
98 questions
19
votes
5 answers
WebSocket Stomp over SockJS - http custom headers
I'm using stomp.js over SockJS in my javascript client.
I'm connecting to websocket using
stompClient.connect({}, function (frame) {
stomp over sockJS connection has 2 http requests:
request to /info
http upgrade request
the client sends all…

user1116377
- 629
- 3
- 15
- 31
11
votes
5 answers
How do we import stompjs in a browser? Or something like stompjs?
I am trying to follow this Spring tutorial on how to use websockets. I am using webpack to bundle my code and babel to convert it from ES6. I am trying to pull in sockjs with a normal import statement.
import SockJS from 'sockjs'
But when webpack…

jhamm
- 24,124
- 39
- 105
- 179
7
votes
0 answers
How to handle internet connection loss in stompjs web socket
I am using stomp js in my angular project and also using WebSocket in java spring for backend.
Here is the scenario where if internet connection is lost in the client pc then how to notify the client that they are disconnected from the WebSocket…

Hardik Siroya
- 117
- 2
- 9
5
votes
1 answer
How to import stompjs in rollup
On ng2 app with typescript I am using stompjs, and it works fine without rollup.
I am importing it:
import {Stomp} from "stompjs"
After running rollup I get "EXCEPTION: Stomp is not defined"
My rollup config is:
import rollup from 'rollup';
import…

Trajche Shoposki
- 221
- 2
- 7
5
votes
2 answers
Spring websocket @messagemapping de-serialization issue java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast
I am writing a spring websocket application with StompJS on the client side.
On the client side I am intending to send a List of objects and on the server side when it is mapping into java object, it converts itself into a LinkedHashMap
My client…

Nikhil Das Nomula
- 1,863
- 5
- 31
- 50
5
votes
1 answer
Tibco EMS connectivity using nodejs /Javascript
How we can connect to Tibco from a nodejs environment.
Have anyone tried to connect to Tibco EMS queue using any nodejs package like stompjs or any javascript component.

eagerToLearn
- 429
- 1
- 10
- 20
4
votes
1 answer
how to use webSocket in angular 6
i need to use webSocket to make a communication between spring and angular 6 (notification), i tried to import stompjs, sockJs-client or even angular2-websocket but nothing works, could you help me ? thank you.

BOUABDELLAH Imane
- 57
- 1
- 3
4
votes
2 answers
How to detect that client has disconnected using websocket in spring mvc
I want to be able to detect when the user has lost connection with the server (closed tab, lost internet connection, etc.) I am using stompjs over Sockjs on my client and spring mvc websockets on my server.
How can i detect when the client has lost…

Dmytro Kostyushko
- 359
- 3
- 13
4
votes
2 answers
stompjs + rabbitmq - create Auto-Delete queues
We're using RabbitMQ + StompJS (w/ SockJS & Spring Websocket as middleware, FWIW) to facilitate broadcasting messages over websockets. Everything is working great, except no matter what we try StompJS creates the Queues as non-auto-delete, meaning…

David Welch
- 1,941
- 3
- 26
- 34
3
votes
1 answer
Spring websocket over stomp
Im new to websocket and have been exploring spring websocket solution, I've implemented the hello world application from the following url: Spring websocket.
Instead of using the index.html page, I would like to call the server from nodejs. Here is…

Gideon Oduro
- 200
- 1
- 2
- 15
3
votes
2 answers
How do I send a message in an Spring ApplicationListener (SessionConnectedEvent)
I'm using Stomp over SockJS with Spring messaging. I'm trying to send a message to all logged in users when a new user is connected. So first off here's my listener:
@Component
public class SessionConnectedListener implements…

Philippe
- 1,356
- 14
- 20
3
votes
1 answer
Sending binary data stompClient to Spring-websocket controller and consuming
I want to send binary data from my stompClient to the spring controller.
this is my JS
var socket = new SockJS('/test/binary');
var stompClient = Stomp.over(socket);
socket.binaryType = "arraybuffer";
var appModel = new…

Ivan Jacobs
- 178
- 1
- 9
3
votes
0 answers
How to increase Text Message Size in ActiveMQ WebSocket transport?
I am using stomp.js to connect to ActiveMQ over WebSocket.
var url = "ws://localhost:61614/stomp";
var topic = "/topic/STOMPTEST";
var message = $('#message').val();
stompClient = Stomp.client(url);
stompClient.connect('', '', function (args) {
…

msaero
- 84
- 9
2
votes
0 answers
React state is empty inside stomp callback function
I'm trying to update react state afte getting data from the websocket connection.
cont[myState,setState] = useState([array of some values]);
useEffect(() => {
if (d1 && d2) {
/* Begin Setup */
const socket = new…

Gulshan Kumar
- 74
- 8
2
votes
1 answer
React setState not updating state inside stomp.js callback function
I have a page that connects to a SockJS socket over stomp. But when pass a function that is supposed to change the state to the .subscribe callback it doesn't change the page's state (the rest of the function completes normally)
Here is the…

Nikitorius
- 49
- 6