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
105 votes
6 answers
88k views

Sending message to specific user on Spring Websocket

How to send websocket message from server to specific user only? My webapp has spring security setup and uses websocket. I'm encountering tricky problem trying to send message from server to specific ...
gerrytan's user avatar
  • 40.9k
46 votes
5 answers
41k views

Spring WebSocket @SendToSession: send message to specific session

Is it possible to send a message to specific session? I have an unauthenticated websocket between clients and a Spring servlet. I need to send an unsolicited message to a specific connection when an ...
Tobia's user avatar
  • 9,380
96 votes
4 answers
74k views

How WebSocket server handles multiple incoming connection requests?

According to here: The HTTP Upgrade header requests that the server switch the application-layer protocol from HTTP to the WebSocket protocol. The client handshake established a HTTP-on-TCP ...
smwikipedia's user avatar
  • 63.4k
98 votes
3 answers
37k views

What are the pitfalls of using Websockets in place of RESTful HTTP?

I am currently working on a project that requires the client requesting a big job and sending it to the server. Then the server divides up the job and responds with an array of urls for the client to ...
smuggledPancakes's user avatar
39 votes
6 answers
83k views

I get a status 200 when connecting to the websocket, but it is an error?

My error shows up in the console of my browser: "WebSocket connection to 'ws://localhost:32768/DspClusterWebServices/myHandler' failed: Unexpected response code: 200" I am using Spring Websockets 4....
smuggledPancakes's user avatar
39 votes
5 answers
53k views

Spring WebSocket: Handshake failed due to invalid Upgrade header: null

I am using wss (secured web sockets) with spring from backend and STOMP for javascript client. Does anyone knows why a get: Handshake failed due to invalid Upgrade header: null
mspapant's user avatar
  • 1,930
13 votes
5 answers
17k views

How to increase output buffer for spring sockjs websocket server implementation

I have used spring implementation of sockjs websocket server and unable to transmit message over 8KB, following is the error 2014-02-12 19:36:29,990 - org.springframework.web.socket.sockjs.transport....
cpandey05's user avatar
  • 1,261
10 votes
4 answers
5k views

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 ...
Zhichao's user avatar
  • 619
6 votes
4 answers
26k views

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 <websocket:message-broker application-...
dikkini's user avatar
  • 1,184
45 votes
3 answers
28k views

Where "user" comes from in convertAndSendToUser works in SockJS+Spring Websocket?

I would like to understand how convertAndSendToUser works in Spring SockJS+Websocket framework. In client, we would connect as stompClient.connect(login, password, callback()) which will result in ...
onkami's user avatar
  • 9,161
36 votes
7 answers
39k views

Disconnect client session from Spring websocket stomp server

I've searched quite a bit and been unable to find this: Is there a way that a spring websocket stomp server can disconnect a client based on the sessionId (or really based on anything at all)? It ...
user1751547's user avatar
  • 2,311
20 votes
1 answer
17k views

How to find all users subscribed to a topic in spring websockets

When making something like a chat application using Spring Websockets, it is useful to know who all is subscribed to any given topic. For, e.g. presence data displayed in the clients. I know that I ...
npskirk's user avatar
  • 1,188
17 votes
5 answers
16k views

Spring Websockets @SendToUser without login?

I have a simple spring application with websocket functionality and everything works so far. Now I want to send a message from my server to a specific client using the @SendToUser annotation. This ...
kentobi's user avatar
  • 491
10 votes
3 answers
11k views

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 ...
Michał Krzywański's user avatar
9 votes
5 answers
23k views

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 ...
Nikhil Das Nomula's user avatar

15 30 50 per page
1
2 3 4 5
13