96 questions
0 votes
1 answer
73 views
What are the possible reasons for a WebSocket connection failing to establish
When the React component mounts, it should create a WebSocket connection to the Spring Boot server using SockJS but instead it closes connection immediately. const App = () => { const [message, ...
0 votes
0 answers
76 views
JS STOMP client wont connect
I am trying to connect to a STOMP "server" and have initialised a connection, however my code gets stuck at STOMP: Opening Web Socket for about 5 minutes, then finally says the connection ...
0 votes
1 answer
669 views
How do I add a Bearer token to @stomp/stompjs or even just a regular JS WebSocket?
I have a simple Spring Boot app, using spring-security to control access to web socket topics. This is done using OAuth to authenticate users with a bearer token. Everything seems to work except I can'...
1 vote
1 answer
2k views
Unable to connect to the STOMP using stomp.js
var stompClient = Stomp.over(function () { return sock; }); console.log("before con"); stompClient.connect({}, () => { setConnected; stompClient.subscribe("/topic/hello&...
2 votes
1 answer
305 views
Can't establish connection between STOMPjs and Java Websocket using STOMP protocol
I followed this Spring Boot tutorial on Websockets implementing STOMP protocol which works perfectly on its own. I wanted to connect it to a frontend app which uses Expo so I am using STOMPjs After ...
2 votes
1 answer
45 views
Error TS2564: Property 'stompClient' has no initializer and is not definitely assigned in the constructor in Angular WebSocket Service [duplicate]
I am working on an Angular service for connecting to a WebSocket server using STOMP protocol. The service establishes a WebSocket connection, subscribes to a topic, and processes incoming messages to ...
1 vote
1 answer
1k views
Web Socket Connection fails to be established in Angular App showing Console message "WebSocket Connection to endpoint failed" using stompjs
I am trying to implement Web Socket communication between my client and Server Applications. My backend service is a Spring Boot Application which sends a custom message object over the socket on a ...
1 vote
1 answer
2k views
WebSocket heartbeat stops sending PING and then receives "Connection closed"
I have a Spring Boot WebSocket application that uses StompJS. There is a heartbeat setup for every 10 seconds to keep the connection alive. Periodically (maybe 2-10 minutes) the connection will be ...
0 votes
1 answer
941 views
How to receive heartbeat sent by StompJS in Spring Boot (without SockJS)
I'm sending heartbeat using StompJS from Angular using this.client.heartbeat.outgoing = 2000; from this documentation https://stomp-js.github.io/stomp-websocket/codo/extra/docs-src/Usage.md.html ...
1 vote
1 answer
1k views
@stomp/stomp.js: can I detect when a subscription was done successfully?
I am using @stomp/stomp.js to connect to a Spring Boot service that allows websocket connections via STOMP. The spring boot service uses interceptors to check whether a user is allowed to subscribe to ...
2 votes
1 answer
740 views
Cannot connect to stomp using stompjs
I am trying to connect to my springboot stomp end points with stompjs library Here is the client code; const client = new Client({ brokerURL: "ws://192.168.179.77:8080/gs-guide-websocket", ...
1 vote
1 answer
95 views
Spring boot websocket chat(stomp) receive function didnt works
I'm currently implementing websockets with stomp However, the send function works on the frontend, but I can't receive it on the server side. SEND destination:/app/chatAddUser content-length:15 ...
0 votes
1 answer
421 views
I can't get @SendToUser to work using STOMP in Spring
I am trying to send message between authenticated users with STOMP in Spring. On the client side I am using STOMP.js. Controller: @MessageMapping("/hello") @SendToUser("/queue/hello&...
0 votes
2 answers
5k views
Web socket connections with @stomp/stompjs in React Native
I am still new to React Native , i am currently working on project that requires to implement a websocket connection in React native app and subscribe to the topic to receive messages from the ...
-1 votes
1 answer
141 views
Recommended Approach When Building Notification Panel with WebSocket and React [closed]
I am building a notification panel using websocket and react. Should i use redux toolkit or useContext for managing centralize location of websockets? or is there any other suggested approach i can ...