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

How to get Session Id in Spring WebSocketStompClient?

How to get session id in Java Spring WebSocketStompClient? I have WebSocketStompClient and StompSessionHandlerAdapter, which instances connect fine to websocket on my server. WebSocketStompClient use SockJsClient. But I don't know how get session id…
Irina
  • 939
  • 1
  • 8
  • 26
13
votes
2 answers

Enabling Cross Origin Requests for WebSockets in Spring

I have a OpenShift Wildfly server. I am building a website with the Spring MVC framework. One of my webpages also uses a WebSocket connection. On the server side, I have used the @ServerEndpoint annotation and javax.websocket.* library to create my…
13
votes
1 answer

Why does sockJS add a '/info' to a given websocket url path

I want to open a websocket port with a "webapp/socket.do" path. When I use SockJS and try to initiate the call by code var socket = new SockJS('/webapp/socket.do'); stompClient = Stomp.over(socket); stompClient.connect({}, ... SockJS…
Lihkinisak
  • 749
  • 2
  • 7
  • 14
13
votes
1 answer

STOMP vs WAMP over Spring-WebSockets

I am currently working on a project that needs to work with WebSockets. The clients will be the browsers only, so not interested in any message broker feature of these two. Although I don't think that it would be much a difference, but would be…
AliR
  • 2,065
  • 1
  • 27
  • 37
13
votes
5 answers

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.session.WebSocketServerSockJsSession - DEBUG -…
cpandey05
  • 1,241
  • 2
  • 17
  • 30
12
votes
3 answers

Spring boot Websocket without SockJS

I have been struggling with this for at least two weeks now. I'm pretty new to websockets. I have good experience with rest endpoints. My use case is simple. Client initiates a websocket connection sending some info to server, and server uses that…
Manikdn84
  • 357
  • 4
  • 21
12
votes
2 answers

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 accept any connections, including both websockets and…
leventunver
  • 3,269
  • 7
  • 24
  • 39
12
votes
2 answers

Spring boot Websocket with stomp js: I keep getting Whoops! Lost connection to http://localhost:8080/ws

I want to integrate chatting into an application I made, and after following some tutorials and running the application I keep getting "Whoops! Lost connection to http://localhost:8080/ws" on my console I tried using sockjs path as"/ws" but still…
appzone_oto
  • 333
  • 1
  • 4
  • 16
12
votes
2 answers

SockJS Python Client

I have a website (Java + Spring) that relies on Websockets (Stomp over Websockets for Spring + RabbitMQ + SockJS) for some functionality. We are creating a command line interface based in Python and we would like to add some of the functionality…
Tk421
  • 6,196
  • 6
  • 38
  • 47
12
votes
0 answers

How to acknowledge websocket (spring websocket + stomp + sockjs) message delivery

I am creating a simple client-server demo using websockets. In this demo client can subscribe to different topics. Whenever server has anything to send, it will just send the message on the appropriate topic and only subscribed clients will get the…
Ravindra Thorat
  • 1,822
  • 1
  • 17
  • 24
12
votes
2 answers

RPC over STOMP using Spring, and correctly handling server side errors propagated to clients

I need to implement RPC over STOMP, where the client runs with javascript in a browser, and the server side is implemented using Spring messaging capabilities. While using @MessageMapping is fine for normal messaging, I find using @SendToUser quite…
Alessandro Polverini
  • 2,301
  • 19
  • 29
11
votes
1 answer

Spring Boot 4.3.5 WebSocket Chat with jwt authorization. No destination in GenericMessage

I'm trying to implement a 1-1 chat for a mobile app(ionic 3) with a spring boot back-end. Seems like run into some config problems. Can't send message probably because the target channel wasn't…
user1935987
  • 3,136
  • 9
  • 56
  • 108
11
votes
2 answers

Spring stomp websockets with vue.js

I'm trying to use Spring websockets (STOMP) with Vue but can't figure out how to do it or if it's even possible. My websockets work with plain JS but when i try with Vue i get stuck. Here is my vue code: var app = new Vue({ el: '#app', data: { …
pressbyron
  • 307
  • 1
  • 2
  • 12
10
votes
1 answer

AbstractWebSocketMessageBrokerConfigurer in Spring-Security deprecated - is there an alternative?

I'm trying to learn more about Spring-Websocket in combination with Spring-Security and was trying out the examples from the Spring Documentation. After creating my class WebSecurityConfig and extending from AbstractWebSocketMessageBrokerConfigurer…
Constantin Beer
  • 5,447
  • 6
  • 25
  • 43
10
votes
3 answers

Scheduled task not working with websockets

I have a spring boot application with websockets: @SpringBootApplication(exclude = {SecurityAutoConfiguration.class}) @EnableScheduling public class TestApplication { public static void main(String[] args) { …