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
6
votes
1 answer

How to get properly all queue messages from RabbitMQ in Spring?

I am using Spring, Spring-Websocket, STOMP for my application, and RabbitMQ as broker. I need to log all messages going through RabbitMQ to Postgresql tables. I know that I can write @MessageMapping in Spring and log there, but my problem is that…
Abzal Kalimbetov
  • 505
  • 7
  • 20
6
votes
1 answer

Spring Websocket: Error during WebSocket handshake: Unexpected response code: 404

I implemented my own Websocket application based on Spring framework and used the same configuration: http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html Server side code: import…
BigDay
  • 191
  • 1
  • 1
  • 5
6
votes
0 answers

Diagnosing issues with Spring WebSocket user destinations

I'm having trouble getting user destinations to work with Spring STOMP websockets. I seem to have the general configuration working. For instance, the following works. Client: svc.stompClient.subscribe('/queue/messages', msg…
Steve
  • 9,270
  • 5
  • 47
  • 61
6
votes
1 answer

Dynamic queues not created when subscribing to topic Spring WebSocket with STOMP?

I am developing push notification to all subset of users who subscribed to particular event. User subscribes to topic in RabbitMQ with format: user-id.event-type.id. I use Spring Websocket, Stomp, RabbitMQ and on frontend SockJS and Angular…
Abzal Kalimbetov
  • 505
  • 7
  • 20
6
votes
1 answer

Spring Websockets Max Concurrent connections

What is the max number of concurrent websocket connections a tomcat instance can support? We are looking to serve 20000 connections at any given time. What would be the recommended number of tomcat instances to support the load?
Robin Varghese
  • 465
  • 1
  • 5
  • 11
6
votes
3 answers

Get associated HTTPSession of websocket session in spring

I have a simple web socket application that uses stomp. when a user visits a page it will automatically make a stomp connection to the server. The user is authenticated via spring security. When the user closes the browser i want the user to…
user3308224
  • 423
  • 2
  • 5
  • 16
6
votes
1 answer

Secured WebSocket upgrade over STOMP via SockJS fails with Invalid Upgrade header null

I am working on a web application that uses Spring Security and WebSockets. I am able to use the WebSockets without issue from my local machine, running the Spring Boot app from the JAR with embedded Tomcat. However, when I upload the same…
6
votes
2 answers

Spring websocket and Stomp.js - how long should i wait between subscribe and send?

I have the following code (from the spring websocket demo app) : stompClient.connect({}, function(frame) { setConnected(true); console.log('Connected: ' + frame); stompClient.subscribe('/user/queue/greeting',…
Urbanleg
  • 6,252
  • 16
  • 76
  • 139
6
votes
1 answer

Push message from Java with Spring 4 WebSocket

I'd like to push messages from Java to WebSocket clients. I've successfully made a js client send to the server and receive a message back on 2 js clients, so the client side code works fine. My issue is that I'd like to initiate a send when events…
James
  • 1,720
  • 5
  • 29
  • 50
6
votes
3 answers

Spring 4 AbstractWebSocketMessageBrokerConfigurer With SockJS Not Negotiating Transport Properly

So I must say that all of the websocket tutorials/examples appear to be so easy, but it seems you really have to dig to find really important pieces of information that are left out of the simple examples. I'm stil having quite a few issues with my…
Bal
  • 2,027
  • 4
  • 25
  • 51
6
votes
4 answers

Stomp over socket using sockjs can't connect with Spring 4 WebSocket

Trying to use Spring 4 WebSocket with STOMP over socket using sockjs. And i faced a problem. My configuration: websocket.xml - part of spring context
dikkini
  • 1,184
  • 1
  • 23
  • 52
6
votes
1 answer

Spring 4 websockets dynamic MessageMapping not executed

I'm using Spring 4 websockets on Tomcat 8 and I have the following configuration:
g00glen00b
  • 41,995
  • 13
  • 95
  • 133
5
votes
0 answers

Invalid SockJS path /topic/mytopic - required to have 3 path segments

I've got a spring boot app in which I'm adding the websocket feature so that websocket client can make subscription request to subscribe messages off the websocket topic. In my controller's method, I've added an annotation…
Sandy
  • 459
  • 2
  • 6
  • 19
5
votes
1 answer

Spring WebFlux with Kafka and Websockets

Right now I have a simple Kafka Consumer and Producer implemented in My SpringBoot application , which works fine what I wanna do next is that my consumer takes the consumed message and directly broadcasts it to all subscribed clients. I figured out…
5
votes
1 answer

Change websocket scope (from application to session/view)

I created a basic web socket with a tutorial. Here is a configuration: @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { @Override public void…
degath
  • 1,530
  • 4
  • 31
  • 60