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.

0
votes
0answers
7 views

Send file from Spring server to Angularjs client with web socket

I've always used rest web services to transfert file between client and server but now I have to make this through web socket. This is the scenary: user requires file download by page interface, so ...
0
votes
0answers
12 views

Spring WebSocket and serving session scoped attributes

I am using Spring MVC for handling users' requests. Each user has its own 'storage' hidden behind session scoped component. The problem I am trying to solve right now is how to serve those session ...
0
votes
0answers
19 views

Spring: Controller Order for Websockets Configuration

I am currently developing an application using spring and websockets. The problem is that this application has a catch-all controller @RequestMapping (value = "/**", method = {RequestMethod.GET}) ...
9
votes
2answers
188 views
+400

Open connections via Spring Websocket STOMP cause our server to die

So we use Spring websocket STOMP + RabbitMQ on the backend and we are having troubles with the open file descriptors. After a certain time, we hit the limit on the server and the server does not ...
-2
votes
1answer
29 views

rabbit-mq Queue not auto-deleted after consumers zero

I set option autoDelete as true for a queue, but sometime even if consumer is 0, the queue still exist How can I find the reason? and how to delete? thanks
0
votes
1answer
39 views

How to customize websocket handshake and/or add a filter?

I need to validate somehow websocket requests. Is there a way to achieve that using spring webflux with reactor-netty? spring-boot 2.0.5.Release reactor-netty 0.7.9.Release
0
votes
1answer
26 views

capture session id in spring websocket

My WebSocketConfig class is @EnableWebSocket @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { @Override public ...
0
votes
0answers
11 views

Spring websocket stop being served

In our application we extend TextWebSocketHandler and override afterConnectionEstablished, afterConnectionClosed and handleTextMessage. handleTextMessage just ignores everything being send to the ...
0
votes
0answers
23 views

While Sending data over spring webscoket getting NUllpointerException

From last 2 days, I am facing this issue. After debugging, I can see that spring websocket sending data to queue but not received by client I am not getting any error but sometime i got this error. ...
0
votes
0answers
12 views

Test cases for SimpMessagingTemplate for rabbitmq in spring boot

I want to write test cases for SimpMessagingTemplate using rabbitmq in springboot. I have already tried to write the same using qpid-brokerhaving version mentioned below. <dependency> ...
1
vote
2answers
42 views

Spring Integration and Reactive WebSockets

Spring integration offers non-reactive inbound/outbound WebSocket adapters which, simply put, associate session with id via internal container, you do some processing on message, and on outbound, it ...
0
votes
1answer
15 views

Web sockets subscription managements for a large dataset and every client subscribing to unique list?

I am designing a price subscription service where users will login and will get real time updates on security prices they are entitled to see. My security subscription is around 500,000 securities. ...
0
votes
0answers
16 views

What happens to the messages that were sent with convertAndSendToUser() after the Websocket disconnects?

I have a Spring + STOMP + RabbitMQ + Websocket that sends a message to a particular User via STOMP subscribe, this works all good, but what happens to the messages sent after the socket disconnects? ...
0
votes
1answer
29 views

How to detect Spring websocket stomp subscription messages (frames)?

I'm using Spring 5: how do I detect SUBSCRIBE messages from a Stomp client? Per my understanding, @SubscribeMapping should make my controller method be called whenever a client subscribes to a topic, ...
0
votes
1answer
25 views

Maybe not public or not valid? Using Spring's Websocket and Kafka

As I am trying to consume data from a topic (the topic name is based on user) and during runtime I am trying to consume message from the topic but I am getting the following error. Caused by: org....
4
votes
2answers
150 views

Real time notifications in spring boot web socket

In my application, I need to send real time notifications to a specific user. My WebSocketConfig class is as below, @Configuration @EnableWebSocketMessageBroker public class ...
0
votes
2answers
76 views

how to implement ping pong in java spring websocket

As per the documentation here https://tools.ietf.org/html/rfc6455#page-37, a websocket must respond to a ping request with pong. I have implemented spring boot websocket to handle the websocket ...
1
vote
0answers
13 views

Return Multiple Objects on STOMP Subscribe Spring Websockets

I have a topic /topic/routes/{routeid} Users subscribe to that topic, and get the current location of a bus on that route, using the following controller method: @SubscribeMapping(TOPIC + "/routes/{...
0
votes
0answers
24 views

web socket Lost Connection to stompEndPoint in cloud foundry

i have created a web-socket in spring boot and deployed it in Cloud foundry. In localhost it is running fine but in cloud foundry it is saying Lost Connection to stompEndPoint Failed to load resource:...
0
votes
0answers
13 views

Spring websocket EOFException onDataAvailable Exception

My project is using spring-boot web socket and tomcat8. Everything is ok but sometimes I got EOFException, Pls help me 2018-08-29 10:40:17 DEBUG LoggingWebSocketHandlerDecorator:46 - New ...
0
votes
0answers
14 views

Spring Websocket with SimpleMessage Broker taking huge CPU usage while Processing messages to clients

I am working on spring WebSocket with SimpleMessage Broker (enabled Stomp Protocol). I am testing my WebSocket application from JMeter where I can make more than 3k connections successfully with my ...
0
votes
0answers
24 views

Spring boot websockets with SockJS fallback - not working as is is supposed to

I am trying to communicate using websockets just as in all the tutorials for spring boot and websockets (org.springframework:spring-websocket:jar:4.3.18.RELEASE). I did the tutorial with @Override ...
0
votes
0answers
25 views

Cannot connect to Spring Boot Websocket

I'm currently building a spring boot with websocket. This is my config class : @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { ...
1
vote
0answers
25 views

SpringBoot with WebSockets, @PreAuthorize header not working

I am using SpringBoot 2.0 (Spring 5.0.4) with SpringSecurity and STOMP (Websockets). My connect endpoint is protected, and Authorization using @PreAuthorize on all of my standard REST endpoints works ...
2
votes
1answer
28 views

Endless queues with auto-generated names keep being created

This is the image reg... queues generated automatically with random names
0
votes
0answers
62 views

How to add a converter to spring template engine context?

I want to manually process a thymeleaf fragment and return the resulting HTML code to the client. The fragment contains a serialization of a passed variable. I have the following code: @Component ...
0
votes
1answer
73 views

Angular 6 BehaviorSubject 'undefined': Error: TypeError: Cannot read property of my declared BehaviorSubject [duplicate]

I'm pretty new to Angular (as well as StackOverflow) and I've been trying to make a small project using Spring Boot as my back-end and WebSockets in attempt to make a small real-time web application (...
1
vote
0answers
22 views

What is the proper way to use Spring WebSocketConnectionManager when sessions closes

I use org.springframework.web.socket.client.WebSocketConnectionManager to work with websockets. Sometimes connection closes, and I have to reconnect. But I didnt find any proper solution to do ...
0
votes
0answers
87 views

Error when deployed Spring4 websocket on Weblogic

I have a spring4 websocket app run on tomcat 7.0.47 is OK, but deploy to weblogic 12.2.1.3.0 gives errors as below, GET /bos/springws/echo HTTP/1.1<br/> Connection: Upgrade<br/> Pragma: ...
0
votes
0answers
11 views

Is Ribbon Load Balancer is capable of handling the web sockets requests?

Im new to Spring cloud, currently building an facade application which uses web sockets to send data to client. I want to use Ribbon for load balancing the requests. i dont find any information ...
0
votes
0answers
34 views

Spring WebSocket and RabbitMQ Web STOMP example

I have done Spring Webscoket + RabbitMQ STOMP. I need to do the same with RabbitMQ Web STOMP Any links or examples for RabbitMQ WEB STOMP?
0
votes
1answer
22 views

running multiple projects on same port

I have two spring projects. One project having web-socket implementation which sends messages to the client and second project have some other services and classes. Before in the client side, I am ...
0
votes
1answer
71 views

Access HTTP Session in WebSocketHandler (Spring-websocket)

Dears, I'm trying to get an HTTPSession in my WebSocketHandler. I could do it successfully when I was using 'javax.websocket-api' but I'm now using 'Spring-Websocket'. The config : @...
1
vote
1answer
129 views

Spring Boot + Spring Web Socket + RabbitMQ Web STOMP

I am working on adding live notification in my application I have done POC with - Spring Boot - Spring WebSocket - SockJS - RabbitMQ STOMP plugin I read about RabbitMQ Web STOMP and want to do POC ...
0
votes
1answer
71 views

How to unit test Spring WebSocketStompClient

I've a Stompclient which connects to a Spring boot server and performs some subscriptions. The code coverage for this websocket client is at 0%. I can only find the code samples for how to unit test ...
0
votes
1answer
20 views

How to flush buffer when ConcurrentWebSocketSessionDecorator bufferSizeLimit exceeded?

I'm using Spring Websocket in my project, I found that ConcurrentWebSocketSessionDecorator stopped when bufferSizeLimit exceeded, but there is no method to recover it. I use it in this way: try { ...
0
votes
0answers
16 views

Spring OAuth Websocket (Stomp): Detect connected users

I'd need to send a Websocket message to users if they belong to a particular group and if one of those is connected via Websocket to the Spring Boot Application at that moment. After days of research ...
0
votes
0answers
77 views

Spring boot websocket send and receive in rest controller

I work in project with Spring boot. I have a one server and multiply websocket clients and multiply rest clients. I need to send and receive data in my rest controller via websockets. I need something ...
0
votes
0answers
251 views

Spring Boot Websocket Security with Angular 5

I am trying to implement websockets in my SpringBoot + Angular 5 application. I followed this tutorial. The code works fine without spring security. But doesn't work with Spring Security. I posted the ...
0
votes
0answers
23 views

Spring websocket Stomp protocol load test

I am creating a real-time service using Spring webSocket Stomp. I have to load test this service and I do not know how to load test it. First of all, we are thinking about a scenario where we send a ...
0
votes
0answers
15 views

Spring Boot API on web security and websocket not working on wildfly server

I am using Spring Boot REST API with web security & WebSocket in my application. I am not able to consume API by deploying wildfly server, but able to consume by deploying Apache Tomcat. ...
1
vote
0answers
88 views

How to implement a custom WebSocket subprotocol with Spring

I have to add support for a custom WebSocket subprotocol (so not STOMP) in a Spring Boot application, but I'm having a very hard time understanding what I need to provide and what Spring already has. ...
0
votes
1answer
112 views

Failed to start bean 'subProtocolWebSocketHandler'; nested exception is java.lang.IllegalArgumentException: No handlers

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-07-25 09:17:32.977 ERROR 8176 --- [ main] o.s.boot.SpringApplication ...
0
votes
0answers
12 views

Spring websockets embedded tomcat server receives PongMessages

I'm using spring websockets without STOMP and apache tomcat embedded server version 8.5.20. Occasionally, the server receives some strange PongMessages but no heartbeat was implemented on client or ...
0
votes
0answers
61 views

Securing websocket with JWT (spring +react)

I want to secure websockets in spring boot. So far i've sucesfully managed to secure normal http requests, but having issues with websockets. I want to be able to secure and then, also, send messages ...
0
votes
1answer
33 views

Spring Web Socket + Docker rabbitMQ connection erro

I'm trying to config Spring boot WebSocket and separate Stomp Broke. Here is the configuration of the socket: @Override public void configureMessageBroker(MessageBrokerRegistry registry) { ...
0
votes
1answer
78 views

Websockets connection fails on Pivotal Cloud but works on localhost

I have a Java Spring Boot based web service called cde-service and an Angular 5 based front end called abc-app. abc-app uses a websocket connection to send logging data to cde-service that in turn ...
0
votes
1answer
40 views

Streaming log messages of a Spring boot web application

This question is for asking general advice on what tools should I use for this task, and possibly pointing me to some related tutorials. I have a Spring Boot web application, which during operation ...
0
votes
1answer
56 views

Spring boot websocket send jsonstring

I'm new to spring boot, and I'm trying to send back jsonstring using websocket but I don't think it is returning correct jsonstring format. RMModel.java public class RMModel { private Integer ...
2
votes
0answers
50 views

Spring WebSocket integration test works at random

I have absolutely simple SpringBoot project with simple configuration and simple integration test to test WebSockets. pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http:...