1,454 questions
-1
votes
0
answers
38
views
Asynchronous thread is not able to obtain updated repository information [closed]
Application.properties
custom.async.executor.corePoolSize=3
custom.async.executor.maxPoolSize=5
custom.async.executor.queueCapacity=2
custom.async.executor.threadNamePrefix=serverAsyncThread-
custom....
0
votes
1
answer
58
views
WebSocket SockJS Connection Blocked by Duplicate CORS Headers in Spring Cloud Gateway + Nginx Setup
Problem
I'm getting a CORS error when connecting to a WebSocket endpoint through Spring Cloud Gateway with Nginx as a reverse proxy (it works on my local env without nginx):
Access to XMLHttpRequest ...
0
votes
0
answers
49
views
How to get sessionId in STOMP CONNECTED frame using Spring Boot WebSocket?
I'm working on a Spring Boot application using STOMP over WebSocket. In my UI client app, I receive the CONNECTED frame like this:
["CONNECTED\nversion:1.2\nheart-beat:0,0\n\n\u0000"]
...
0
votes
0
answers
45
views
Spring STOMP Principal is null
I’m trying to implement authentication in a Spring Boot WebSocket (STOMP) application using a custom ChannelInterceptor.
In my AuthChannelInterceptor, I validate a JWT token during the CONNECT command ...
0
votes
0
answers
30
views
React-Natice Android App + Metro + Java SpringBoot. WebsocketSTOMP Handshake issue
Hi guys I need some help with WebsocketSTOMP in React-Native Android app and Metro.
I can get the connection but no the STOMP handshake.
Frontend DevTool console:
Backend Terminal in Java SPring Boot:...
0
votes
0
answers
34
views
Preventing Non-STOMP WebSocket Connections from Bypassing STOMP Interceptor level Authentication in Spring Boot
I am using WebSocket with a STOMP client in Spring Boot (I’ll share the configuration file below). I also have an interceptor for authentication control. For connections coming through STOMP, ...
0
votes
0
answers
44
views
ReactJS, SpringBoot WebSocket
I have a webscoket endpoint in SpringBoot that I'm trying to call from a React application, but no matters what I do the output in React is this:
WebSocket connection to 'ws://localhost:8083/message/...
1
vote
1
answer
87
views
How to access authenticated user principal in SessionConnectedEvent when using a ChannelInterceptor for JWT authentication?
I’m using a custom WebSocketChannelInterceptor (implements ChannelInterceptor) to handle authentication during the CONNECT STOMP command. The interceptor extracts and validates a JWT token from the ...
0
votes
0
answers
29
views
Spring WebSocket STOMP: convertAndSendToUser() not delivering private messages
I'm implementing private messaging with Spring WebSocket STOMP, but messages sent via convertAndSendToUser() are not being delivered, while broadcast messages work fine. The client subscribes to /user/...
0
votes
0
answers
26
views
Spring WebSocket: How to reject group message but still send error to /queue/errors/{userId}?
I would like to send message to /queue/errors/{userId}, when user is not in the group and also I would like to reject message to group. Problem is how to send message to /queue/errors/{userId} without ...
0
votes
0
answers
92
views
Spring API Gateway configuration for reactive and non-reactive web sockets
I'm working on a WebSocket proxy microservice in Java, built using the org.java_websocket.* library. It connects to a remote server that streams VNC data. The goal is to allow clients—like noVNC—to ...
0
votes
0
answers
34
views
Spring WebSocket with SockJS not publishing messages to /topic destination
I’m trying to implement WebSocket support in my Spring-based backend using STOMP over SockJS. The WebSocket connection is established successfully, but messages published from the backend to /queue/...
1
vote
1
answer
135
views
Spring Boot WebSocket STOMP + JWT (@PreAuthorize) SecurityContext problem: "Authentication object was not found"
I'm building a Spring Boot chat application with:
WebSocket (STOMP) endpoint (with message broker)
Clients connect via STOMP and authenticate with JWT (sent as a STOMP Authorization header in the ...
1
vote
1
answer
67
views
SpringConfigurator uses uninitialized Log4j2
I'm trying to use SpringConfigurator to configure websocket endpoint. In theory, it should be as simple as:
@ServerEndpoint(value = "/my-endpoint", configurator = SpringConfigurator.class)
...
0
votes
0
answers
45
views
Error "When allowCredentials is true" with allowCredentials is false
I have an application with a websocket connection, but when I test it with the wscat tool I get a return saying "connection received [connection_id]" but when I try to make the connection ...
0
votes
0
answers
106
views
Failed to connect to websocket server in my spring boot application using Angular
I'm trying to make a WebSocket connection in my application using angular and springboot, I have 2 configuration classes, one called UploadSocketHandler and WebSocketConfig. And I'm getting the ...
0
votes
0
answers
64
views
Spring Boot 3.0.0 Security WebSocket Authorization Issue with JWT Token in Kotlin - Access Denied
I am working on connecting my Ionic Angular application to a WebSocket on my Spring Boot application. My Spring Boot app uses Spring Security and is configured to authenticate WebSocket connections ...
0
votes
0
answers
36
views
Websocket over StompJS not able to send message to host, running Springboot
I have an Angular fontend application with a Spring Boot backend that uses websockets over Stomp. The app can successfully send websocket messages from the host to the browser. I need to now send ...
0
votes
0
answers
50
views
Spring Cloud Gateway Fanout With multiple websocket services
I have one websocket service that can be connected via ws://localhost:8080/poc/ws1.
I have created Spring coud gateway which is hosted in localhost:7070
When I use below conguration, I could able ...
2
votes
0
answers
117
views
Message Sent to Queue but Not Received by Subscribed Clients
I am implementing WebSockets using Spring Boot with STOMP for real-time notifications in my application. My setup includes a WebSocket configuration, security configuration, and a WebSocket handler ...
0
votes
0
answers
157
views
How to do plain websocket with Spring/Jetty
I'm trying to get the basic websocket working in Spring with Jetty, as covered here.
At the time of the upgrade, runtime is reporting that the provider is null.
java.lang.NullPointerException: Cannot ...
1
vote
0
answers
94
views
Using Spring Websocket to make One to One Chatting application but message is not reaching the Recievers End
I am have been building the One to One Chatting Application using Spring boot and React JS. I am getting an issue when I am sending the message from one user is another. As I making one to one ...
0
votes
0
answers
45
views
Websocket use session but how can manage those session on multiple instance
Scenario
I have Two Spring Boot services(service-a,service-b) and one front-end service. The front end service will connect to my service-a via STOMP Web Socket broadcast channel. When messages arrive,...
0
votes
0
answers
104
views
How do I subscribe to a user's destination in Spring Messaging WebSockets?
Trying to follow the documentation I would like to send a message to the user's destination and subscribe to it from a browser. The full demo is available here but basically I have
@MessageMapping(&...
0
votes
1
answer
697
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'...
0
votes
2
answers
358
views
How to handle ping messages in Java Spring WebSocket
Can you please help me on how can I handle ping messages when extending a websocket handler?
Currently I am extending the Spring's AbstractWebSocketHandler, but even though I see that there exists ...
0
votes
0
answers
16
views
I am sending websocket message to both sessions on different android emulators but only one phone is receiving the object?
SPRINGBOOT BACKEND:
@Transactional
private void acceptPairingRequest(JSONObject jsonObject, WebSocketSession receiverSession) throws IOException, InterruptedException {
JSONObject finalPairing = ...
0
votes
0
answers
91
views
Is there a way to notify a web socket if they are not permitted to subscribe using spring-security?
For the full repo look here
I have the following...
@Bean
fun messageAuthorizationManager(
messages: MessageMatcherDelegatingAuthorizationManager.Builder
): AuthorizationManager<...
1
vote
1
answer
183
views
Setup Spring OAuth based authentication/authorization Using Web Sockets
I'm using org.springframework.security:spring-security-messaging.
To start with I have a project that is successfully authenticating using oauth...
spring:
security:
oauth2:
resourceserver:...
1
vote
1
answer
200
views
How do I call a STOMP message with Postman using injection (Using Kotlin)?
I have the following...
@MessageMapping("/hello")
@SendTo("/topic/greetings")
@Throws(Exception::class)
fun greeting(message: TestMessage): Greeting {
However, when I run and send ...
-1
votes
1
answer
34
views
Why i cant integrate Spring WebSocket?
I tried to integrate websockets to my spring application and for beggening i tried to just copypast spring's tutorial
but somewhy i can't connect to websocket by using postman, but when i'm using ...
0
votes
0
answers
124
views
Spring Boot - How configure websocket maximum payload size
I have been trying to configure the maximum payload size for binary and text messages for the Websocket server application in Spring Boot without any success.
It's valid to mention I'm not using ...
1
vote
1
answer
506
views
Is Spring Web Socket Buffer Size Limit per connection
I'm working on a project where we are evaluating how much data load a spring service will potentially handle via web socket and how much buffer size should be set.
I understand when the web socket ...
0
votes
2
answers
440
views
STOMP Connection Closes Due to Missing Heartbeats Despite Frontend Showing Ping-Pongs
I'm facing a connection issue with my WebSocket setup using STOMP and ActiveMQ Artemis. The error message I receive in my logs:
Received ERROR {message=[AMQ229014: Did not receive data from /192.0.2.1:...
1
vote
0
answers
85
views
Connection Polling with Spring Web Socket over STOMP with external Broker
Currently, I have Set up spring websockets over STOMP and messages are routed to RabbitMQ and it acts as an external broker. My current setup looks like below:
@Override
public void ...
0
votes
1
answer
150
views
WebSocket with Kafka/Active Mq/Rabbit Mq | Spring
My On-Prem application details:
Frontend - Reactjs deployed in 4 VMs [a,b,c,d]
Backend - Spring microservices[Stateless] deployed in 4 VMs [w,x,y,z]]
Database - Sql server
Load Balancer - F5
CDN - ...
0
votes
2
answers
2k
views
WebSocket connection Disconnects When Browser Tab is Inactive
I'm using Spring WebSocket with STOMP to establish a WebSocket connection between my server and clients, which are using stomp.js on the frontend. My application works well when the tab is active, but ...
1
vote
0
answers
103
views
Spring Boot WebSocket Test: HTTP 400 Error on WebSocket Upgrade Request
Title:
Spring Boot WebSocket Test: HTTP 400 Error on WebSocket Upgrade Request
Question:
I'm trying to test a WebSocket endpoint in a Spring Boot application, but I keep getting an HTTP 400 error when ...
2
votes
1
answer
323
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 ...
0
votes
0
answers
88
views
How to handle CORS configuration of API gateway and Socket in Springboot Microservices
I have a Springboot Microservice application. I have 4 microservices in my application.
API-gateway,
user-management,
idm-service,
engine-service.
I am using react as frontend here.
API-gateway ...
0
votes
0
answers
109
views
how to resolve WebSocket connection issue error code 1006 On GCP?
I am facing web socket disconnection problem with 1006 on production environment. I unable to find the exact problem. We tested without firewall restriction on GCP , that also not working as expected. ...
0
votes
1
answer
121
views
Why does my Spring Integration app just shutdown without listening?
I am trying to implement a Spring Integration app that listens to websocket messages from an external source and logs them to stdout. However as soon as I start my application it shuts down again, if ...
1
vote
1
answer
169
views
WebSocket connection error on Unity WebGL
I created a Spring WebSocket server.
I want to real-time connection with Unity webgl.
It works well when I connect with postman.
It works well on Unity Game Scene.
async void Start()
{
Debug....
1
vote
0
answers
244
views
How to return the handshake response headers from the websocket destination route on Spring Cloud Gateway
I'm using Spring Cloud Gateway to connect to a backend server using websockets. The route works, but the custom headers added by the destination server are not being returned to the client.
How can I ...
2
votes
0
answers
83
views
Unable to acquire WebSocket connection with Spring Cloud Gateway and Spring Security
I'm developing an application which require WebSocket connections. I have developed a Spring Boot microservice called notification-service which holds web socket configurations. Further, I have ...
2
votes
0
answers
257
views
Spring websocket with NATS as stomp broker No enum constant error
I am trying to connect my websocket spring server to a NATS as stomp broker
@Override
public void configureMessageBroker(MessageBrokerRegistry config) {
config
....
0
votes
1
answer
45
views
Client not receiving direct messages: Spring Websocket, Stomp
My Front end client is not receiving the messages from the server. Upon subscribing to the chat it needs to receive a message from the server but this is not received. I've tried the client ...
0
votes
0
answers
146
views
Implementing a simple websocket client in spring boot listening to 2 different websocket endpoints - but they always start executing together
I have 2 websocket endpoints producing related messages:
"ws://localhost:8032/posts"
"ws://localhost:8032/comments"
Comments are guaranteed to be published after a referred post ...
0
votes
1
answer
1k
views
Setting WebSocket session idle timeout using Spring's Websocket API & Jetty 10
I have embedded Jetty 10 and Spring 5.3.37 (non-spring boot) application on it.
While integrating WS server (non-sockjs/stomp) into the application I faced the idle timeout issue, it's too short for ...
0
votes
1
answer
357
views
Spring 6 application can't start when setting heartbeat and task scheduler for WebSockets
In upgrading a Spring Boot 2 application to Spring Boot 3 (Spring 5 to Spring 6) it fails to start due to WebSocket configuration.
@Configuration
@EnableWebSocketMessageBroker
public class ...