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.

This implementation supports the websocket protocol (RFC6455) and the Java websocket API (JSR-356), with fallback options using SockJS.

See:

1417 questions
10
votes
1 answer

Performance Issue with Spring Websocket, RabbitMQ and STOMP

I'm struggling with a performance problem for over two months now and I can not solve it. Therefore I'd like to ask for ideas what the problem could be. Issue We develop an application with Spring Websocket where a client subscribes to its user…
Marcus Held
  • 635
  • 4
  • 15
10
votes
2 answers

Spring-boot tomcat is able to offer only lesser than 10,000 connections?

I am testing the server with spring-boot. However, I got some problems during doing test. my test is How many memories server use with increasing the web socket sessions(the number of client). 1,000 clients(lesser than 9000 sessions) has no issues…
Jason
  • 371
  • 5
  • 9
  • 17
10
votes
3 answers

Spring Websockets STOMP - get client IP address

Is there any way to obtain STOMP client IP address? I am intercepting inbound channel but I cannot see any way to check the ip address. Any help appreciated.
Damian
  • 593
  • 6
  • 27
10
votes
4 answers

SockJS receive stomp messages from spring websocket out of order

I am trying to streaming time series data using Springframework SimpMessagingTemplate (default Stomp implementation) to broadcast messages to a topic that the SockJS client subscribed to. However, the messages is received out of order. The server is…
Zhichao
  • 599
  • 5
  • 14
10
votes
3 answers

Stomp over websocket using Spring and sockJS message lost

On the client side javascript I have stomp.subscribe("/topic/path", function (message) { console.info("message received"); }); And on the server side public class Controller { private final MessageSendingOperations
user2001850
  • 477
  • 4
  • 18
10
votes
1 answer

Stomp over websocket : The send buffer size exceeded the allowed limit

At client side I am using Stomp for websocket connection and server side I am using Spring 4 It client side I did configuration as var socket = new SockJS(urlBase + "/" + contextroot+'/hello'); stompClient = Stomp.over(socket); Below code…
Deepak Mule
  • 437
  • 5
  • 21
10
votes
2 answers

Send Message to all clients via SimpMessagingTemplate in ServletContextListener

I'm using the Spring framework and I have a working websocket controller that looks like this: @Controller public class GreetingController { @MessageMapping("/hello") @SendTo("/topic/greetings") public Greeting greeting(HelloMessage…
battmanz
  • 2,266
  • 4
  • 23
  • 32
10
votes
2 answers

How can I send a message on connect event (SockJS, STOMP, Spring)?

I am connection through SockJS over STOMP to my Spring backend. Everything work fine, the configuration works well for all browsers etc. However, I cannot find a way to send an initial message. The scenario would be as follows: The client connects…
Adam Soliński
  • 444
  • 1
  • 8
  • 19
9
votes
3 answers

How to correctly emit values to Sink from multiple Fluxes (WebsocketSession::receive) in Spring WebFlux?

In my simplified case I want to broadcast a message sent by WebSocket client to all other clients. The application is built using reactive websockets with Spring. My idea was to use single Sink and if a message is received from the client, emit it…
9
votes
2 answers

How to globally handle Spring WebSockets/Spring Messaging exception?

Question Is there a way to globally handle Spring Messaging MessageDeliveryException caused by error (usualy insufficient authorities) in Spring WebSocket module? Use case I have implemented Spring WebSockets over STOMP to support ws connection in…
Plebejusz
  • 3,332
  • 2
  • 19
  • 26
9
votes
1 answer

Spring (Grails) WebSocket logs instantly an error: SubProtocolWebSocketHandler - No messages received after *** ms

Having Grails 3.2.11 (Spring 4.3.1, Spring Websocket 4.3.9) I receive log error message that websocket session is idle. 2017-08-09 14:06:45,820 ERROR org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - No messages received after…
kuceram
  • 3,795
  • 9
  • 34
  • 54
9
votes
1 answer

Self-Connect to Websocket Spring server from JUnit test

I have an app that exposes Websocket/SockJS/Stomp server endpoints and would like to run a JUnit tests that runs client (Java STOMP client, also from Spring) against it, to test "sending" features. I have a test like public void…
onkami
  • 8,791
  • 17
  • 90
  • 176
9
votes
0 answers

Excessive ERROR logs failed hearbeats with Spring SockJS and non-websocket transports

We're using Spring's SockJS with Stomp to send push messages to the browser. It works fine so far, but when a client (browser) disconnects, we get an ERROR log everytime because the scheduled hearbeat fails: 11:11:18.241 [MessageBroker-1] ERROR…
static-max
  • 739
  • 10
  • 19
9
votes
0 answers

Socket.io with Spring MVC

Have someone tried to make a friendship between socket.io and spring mvc? I've found many examples with using of sockJS over Stomp and no examples of socket.io.
9
votes
5 answers

STOMP Spring WebSocket message exceeds size limit

I am implementing Spring WebSocket into our Spring MVC web application. However I am running into message over size limits when I am trying to send a really big message to an endpoint. I am getting the following error: message:The 'content-length'…
Nikhil Das Nomula
  • 1,863
  • 5
  • 31
  • 50