Questions tagged [spring-websocket]
A Spring Framework module that support WebSocket-style messaging in web applications (native websocket and with SockJS support), including use of STOMP as an application level WebSocket sub-protocol.
spring-websocket
1,475
questions
0
votes
0
answers
8
views
Does Simple Broker auto deletes the message queue in Stomp Websocket?
I am new to learning Websockets and how they work.
In my implementation of Websocket using Springboot (React Client), I am using one connection
[ ws://localhost:8080/intl-moa/ws-endpoint (for eg)]
I ...
1
vote
0
answers
21
views
How can I broadcast a STOMP messages to all RabbitMQ servers?
I'm working in a multiserver environment. It uses Spring WebSocket and RabbitMQ as an external broker for STOMP.
My JavaScript clients send messages to one single backend server through a balancer. It ...
0
votes
0
answers
11
views
Spring 4.2.9 WebSocket server on WebLogic 12.2.1.4 -> 401 Unauthorized
I am trying to add a websocket endpoint to a Struts 2 + Spring Framework 4.29 web application deployed on a WebLogic 12.2 server that has to listen for text and binary data from a network scanner. But ...
1
vote
0
answers
39
views
Failed to instantiate [org.springframework.web.servlet.HandlerMapping]:Factory method 'stompWebSocketHandlerMapping' threw exce with message: null
I am recently upgrading the Java 11 to Java 21 and Spring Boot 2.x to Spring boot 3.2.5. Post migration I am end up with a Run-time Exception which I do not have any clue at all.
I am using ...
0
votes
3
answers
126
views
How to secure microservice websocket endpoint with Spring Cloud Gateway?
I have a microservice architecture based project, for which I have added Spring Cloud Gateway in front. My plan is to centralize security in the gateway. I have added OIDC and OAuth 2 for ...
0
votes
0
answers
27
views
@SendToUser does not work, but convertAndSendToUser works
@SendToUser doesn't send messages to given path, but convertAndSendToUser() do. I checked the client side and it subscribes correctly. I expect @SendToUser in RoomExceptionHandler to send errors when ...
0
votes
1
answer
67
views
Why is CSRF protection needed for connecting to websockets if Spring Security implements Same Origin Policy at server level?
As per Spring Security documentation, for websockets there is SOP implemented at the server level, as opposite to regular http where the browser implements SOP. However, Spring Security also requires ...
0
votes
0
answers
23
views
Issue Receiving WebSocket Notifications in a Spring Boot Application
I am working on a Spring Boot application using WebSocket for real-time user-specific notifications. Although the WebSocket connection is established and notifications are correctly sent from the ...
1
vote
0
answers
23
views
Not Receiving WebSocket Notifications in Spring Boot Application
I am currently working on a Spring Boot application that uses WebSockets for real-time communication. I have set up a notification system where notifications are sent to a specific user via WebSocket. ...
-1
votes
0
answers
30
views
CORS failure - Origin not matching
Hope all are well?
I have been trying to work with websockets implementation in Spring. I am running into an issue with CORS where the client is sending the origin header as http://localhost:3000 ...
1
vote
1
answer
25
views
How to deny preSend() in ChannelInterceptor based on custom check via DB call
Within my WebSocketConfig class:
@Configuration
@EnableWebSocketMessageBroker
class WebsocketConfig(<...>)
I override:
@Bean(name = ["csrfChannelInterceptor"])
fun ...
-1
votes
0
answers
48
views
Spring Boot 3.3.0 Websocket Server StompEndpointRegistry preserveReceiveOrder ConcurrentModificationException
Prior to spring boot 3.2.x I was able to "preserve receive order" by configuring the ClientInboundChannel of the WebSocket server with a single thread (not a scalable solution). I noticed ...
0
votes
0
answers
23
views
@SendToUser doesn't send message to user
I have a problem. I would be very happy if someone could help me with this. My Spring server successfully receives the message and sends a message to "/queue/private-messages", but my ...
0
votes
0
answers
38
views
WebSocket Chat Application in Spring Boot Not Receiving Messages in Postman
Problem Description:
I'm working on a WebSocket chat application using Spring Boot. The application uses STOMP over WebSocket for communication. When I test the WebSocket connection in Postman, I can ...
0
votes
0
answers
19
views
How to handle and replace message from SubProtocolWebSocketHandler in Spring Stomp Web Socket
I am using WebClientSocket library from Arduino and connect with Spring Boot Web Socket.
The issue occur when command send from microcontroller to web server socket.
STOMP command has end of string ...