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
25
votes
3 answers

Stomp.js is out of date and no longer maintained - which Stomp client to use with Spring Websockets?

I found it surprising that the current documentation for the Spring WebSocket Support directs users to use stomp.js for their client-side JavaScript implementation. This project, on the ReadMe on it's GitHub page, says: This project is no longer…
rikoe
  • 1,639
  • 1
  • 21
  • 29
24
votes
1 answer

Partial messages with SockJS in Spring-Websockets 4.2

I am using Spring-Websockets 4.2 with SockJS. Since the messages received by clients can be quite large, I would like to use partial messages. My subclass of TextWebSocketHandler does override supportsPartialMessages to return true. However, since…
Jan
  • 241
  • 2
  • 6
21
votes
2 answers

Error during WebSocket handshake: Unexpected response code: 403

I have implemented WebSockets with Spring Boot Application and have the below error message when trying to test the ws connection with the chrome extension 'Smart websocket client'. However, I have no problem when run the Spring Boot Application…
M.Bel
  • 213
  • 1
  • 2
  • 6
21
votes
3 answers

Sending images/files over Sockjs + Spring Websocket + Stomp

I am working on a messaging application using Spring websockets(STOMP as a sub-protocol) and Sockjs. I should provide support to send files in messages. According to this ticket, sockjs does not support binary data, but STOMP does. I know that we…
Karthik
  • 4,950
  • 6
  • 35
  • 65
20
votes
1 answer

Redirecting websocket communication from client to a server to another websocket server

I already have a SimpleBrokerWebsocket implementation. Now I am migrating towards microservices based architecture and trying to create messaging as a separate microservice. To avoid breaking existing client deployments and to gradually move…
Vivek
  • 326
  • 1
  • 3
  • 15
20
votes
1 answer

STOMP or XMPP - Over websocket

I am working on a project which involves real time chat (messaging, including group chats). I have worked with websockets before, So I started working on this using spring-websockets and I did some reading about what is the best way to implement it.…
Karthik
  • 4,950
  • 6
  • 35
  • 65
20
votes
2 answers

Multiple rooms in Spring using STOMP

Is it possible to create rooms with STOMP and Spring 4? Socket.IO has rooms built in, so I'm wondering if Spring has this My code at the moment: @MessageMapping("/room/greet/{room}") @SendTo("/room/{room}") public Greeting greet(@DestinationVariable…
Dolan
  • 1,519
  • 4
  • 16
  • 36
20
votes
1 answer

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 can implement ApplicationListener and keep my own…
npskirk
  • 1,188
  • 1
  • 8
  • 21
19
votes
1 answer

Connecting to Stomp over WebSockets implemented using Spring 4 from Java client

I received a Web application, implemented with Spring using STOMP over WebSockets Messaging, similar to what's described here (with RabbitMQ at the backend). It runs on Tomcat, and I can connect to the application using regular URLs (e.g.…
timbre timbre
  • 12,648
  • 10
  • 46
  • 77
19
votes
3 answers

Difference between /topic, /queue for SimpleMessageBroker in Spring Websocket + SockJS

Is there a clarification, what is the differences between /topic, /queue etc. for Spring Websocket + SockJS in case I am using "simple broker" ? E.g. here Sending message to specific user on Spring Websocket it is said: when your client subscribe…
onkami
  • 8,791
  • 17
  • 90
  • 176
19
votes
4 answers

Spring Async issue when upgrading from 4.2.0.RC3 to 4.2.0.RELEASE

I've a web application using the spring(4.2.x) artifacts spring-webmvc, spring-messaging, spring-websocket I've the below @Enable* annotations in my spring config java…
Subham Saha
  • 249
  • 1
  • 4
  • 9
18
votes
2 answers

Spring websocket send to specific people

I have added custom token based authentication for my spring-web app and extending the same for spring websocket as shown below public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { @Override public void…
BiJ
  • 1,639
  • 5
  • 24
  • 55
18
votes
3 answers

Spring 4 websocket without STOMP,socketjs

I am trying to test websocket without using socketjs library and also i don't want to add any stomp connection. I am following the example from stackoverflow question: WebSocket with Sockjs & Spring 4 but without Stomp So without stomp server , I…
melihcoskun
  • 326
  • 1
  • 4
  • 19
17
votes
2 answers

Spring websocket (WSS) with angular sockjs (HTTPS) over secure web socket server (tomcat)

I'm working on sending messages from the server side to angular client application using Spring web socket + stomp + SockJsClient at server side and SockJS at the angular side. My Socket server is a spring boot application and running on 8080…
John Martin
  • 173
  • 1
  • 5
17
votes
2 answers

Send Notification to specific user in spring boot websocket

I want to send notification to specific client. e.g username user @Configuration @EnableWebSocketMessageBroker public class WebSocketConfiguration extends AbstractWebSocketMessageBrokerConfigurer { @Override public void…
naila naseem
  • 577
  • 3
  • 12
  • 21
1
2
3
94 95