Skip to main content

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
0 votes
1 answer
10 views

Spring 5 Websocket endpoint not reachable

I implemented a simple websocket endpoint in my Spring app (which is deployed in Tomcat) and I cannot reach it. Configuration in my application context XML <bean id="myWebSocketHandler" ...
Johnson's user avatar
  • 29
-1 votes
1 answer
21 views

Custom Jetty WebSocketPolicy with Spring6 / Spring Boot 3 Web Sockets

In older versions of Spring, a custom policy could be applied by doing the following: @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig extends ...
rento's user avatar
  • 93
0 votes
0 answers
20 views

SpringBoot - Websockets STOMP 1.2 - How to detect and log heart-beat from client and from server

How do I capture and log STOMP heart-beats sent by the clients and by the server? I have SpringBoot configuration below for websockets using STOMP @Configuration @EnableWebSocketMessageBroker public ...
Samuel 's user avatar
  • 353
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 ...
Aakriti Sahrawat's user avatar
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 ...
Tobia's user avatar
  • 9,380
0 votes
0 answers
14 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 ...
karmapolice's user avatar
1 vote
0 answers
44 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 ...
SethuNagaKarthik's user avatar
0 votes
3 answers
180 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 ...
IonutB's user avatar
  • 73
0 votes
0 answers
29 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 ...
dimitri08's user avatar
0 votes
1 answer
74 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 ...
IonutB's user avatar
  • 73
0 votes
0 answers
25 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 ...
Eshtar Chi7aja's user avatar
1 vote
0 answers
25 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. ...
Steph af's user avatar
-1 votes
0 answers
31 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 ...
Himanshu Bhardwaj's user avatar
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 ...
Captain Jacky's user avatar
0 votes
0 answers
25 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 ...
Yehor But's user avatar
0 votes
0 answers
41 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 ...
Steph af's user avatar
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 ...
Mobile Dev's user avatar
0 votes
0 answers
18 views

Issue with Dynamically Configuring Streams in RabbitMQ with STOMP and WebSocket

I hope you are all well. I would like to share a problem I am facing in my messaging architecture. Architecture: Web clients: Connect to RabbitMQ using the STOMP protocol. Exchange: Clients subscribe ...
Francisco Espinosa Gonzales's user avatar
0 votes
1 answer
84 views

Spring websocket connection closed by spring cloud gateway after 30 seconds

My application is a microservice application. I am using spring web sockets to send notifications to the front end. In my application, I have a gateway service to route the HTTP requests to the ...
Devmina's user avatar
  • 45
0 votes
0 answers
15 views

Spring SimpleBroker and strange stomp Connected message

I'm working with Spring 6.0.9 and Stomp. If I use RabbitMq as external Broker, the Stomp "CONNECTED" message looks like this: message (org.springframework.messaging.support....
Tobia's user avatar
  • 9,380
0 votes
0 answers
40 views

Spring STOMP and ping/pong timing

I'm working with Spring STOMP and rabbit mq. I'm deepening some disconnections issues probably disposed by a reverse proxy server. I would like to know how has in charge the ping/pong handling, is ...
Tobia's user avatar
  • 9,380
0 votes
0 answers
37 views

How to send messages to specific user from service layer using spring boot web socket

I was trying to send messages to a specific user from the Spring Boot application service layer. My application is a microservice application. My requirement is, when one of microservice send a ...
Devmina's user avatar
  • 45
1 vote
0 answers
107 views

Amazon MQ as broker relay for Spring + Websocket + Stomp is not working

Im not able to connect to Amazon MQ(Active MQ) which i'm setting up as broker relay for web-socket connections over STOMP protocol. Below are few of my configuration attempts Environment: Spring Boot ...
SelvarajKumarasamy's user avatar
1 vote
2 answers
250 views

Websocket connection fails when adding Spring Boot Security

In a project, I have to implement a live chat between users. To do so I decided to use Websockets. I currently have a frontend client written in React and a Spring boot backend written in Java. The ...
Jay24's user avatar
  • 21
0 votes
0 answers
44 views

When event is triggered, User comes as null, Spring Boot, Secure Websocket

Hello guys, I have a weird problem with WebSocket in Spring Boot. Now, I am trying to authenticate the user when the user triggers an event from the client side (React, Typescript app); I have no ...
Gollum's user avatar
  • 33
0 votes
0 answers
17 views

Angular can't access Springboot through Websockets

I'm having a porject, where Springboot is hosting the Angular frontend. The backend is receiving data from a external MQTT-Broker and is supposed to broadcast specific messages that it receives to an ...
Zerox's user avatar
  • 290
1 vote
0 answers
20 views

Why does Webflux WebSocketHandler returned as a lambda expression share the response, but not when defined as a component

The following configuration that returns WebSocket#handle as a lambda expression shares the Entity to all browser connections. @Bean public WebSocketHandler webSocketHandler (ObjectMapper ...
dinah_foster's user avatar
1 vote
1 answer
64 views

Spring WebSocket: Discrepancy in CORS Behavior between XMLHttpRequest and Fetch Requests despite Credentials Set to False

I have configured Credentials to false in my Spring WebSocket application. However, when I request http://192.168.7.175/api/webSocketEndPoint/info?t=17139606, the response status is 200. Despite this, ...
sadeq shahmoradi's user avatar
0 votes
0 answers
33 views

404 error when trying to connect to the websocket (Angular + Spring boot)

In Angular i tried to connect to the websocket but an error message is returned : websocket.service.ts:15 GET http://localhost:8081/socket.io/?EIO=4&transport=polling&t=OxuZ1WH 404 (Not Found) ...
asma's user avatar
  • 1
0 votes
0 answers
44 views

I am trying to make a java websocketWhen I am trying to connect to websocket, I am getting following error : Request method 'GET' is not supported

Pom.Xml : <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
asma's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
50