sockjs

Java SockJS Spring client and message size

一个人想着一个人 提交于 2019-12-08 23:11:31
问题 Using SockJS java client, I am trying to connect to Spring sockjs server and is getting error 1009 for messages (without headers) of ~20Kb. Javascript library works fine. Transport closed with CloseStatus[code=1009, reason=The decoded text message was too big for the output buffer and the endpoint does not support partial messages] in WebSocketClientSockJsSession [id='9fa30eb453e14a8c8612e1064640646a, url=ws://127.0.0.1:8083/user] I have couple of config classes on server (I do not know at

SockJS Java Client Implementation for non-web application

前提是你 提交于 2019-12-08 09:35:06
问题 How do I implement SockJS client in java swing application with spring boot. if there have pretty good example please mention. 回答1: First off, consult the official docs: https://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html A non-web application would still need an app server, in your case, one of the embedded solutions should definitely suffice. If you're using maven, try for example: <dependencies> <dependency> <groupId>org.springframework</groupId>

Meteor, Modulus and secure websockets

我与影子孤独终老i 提交于 2019-12-08 00:44:41
问题 Trying to get my head around websockets and xhr in a Meteor -> Modulus context. I've been noticing lengthy response times on occasion apparently due to websockets falling back to xhr when it can't connect...I'm trying to diagnose why. Production app is being hosted on Modulus. SSL enabled. Things I've done/checked so far Upgrade all the things: The app has been running at 1.0.2.1 (latest) but was originally created during the ~0.65 days. As first order of business I upgraded the standard-app

How configure the Spring Sockjs Java Client message converters

只谈情不闲聊 提交于 2019-12-07 23:06:53
问题 I have one SockJS Java client that use STOMP. Is base on this https://github.com/rstoyanchev/spring-websocket-portfolio/blob/master/src/test/java/org/springframework/samples/portfolio/web/load/StompWebSocketLoadTestClient.java. My code: package mx.intercommunication.websocket.stompclient; import org.springframework.messaging.converter.StringMessageConverter; import org.springframework.messaging.simp.stomp.StompCommand; import org.springframework.messaging.simp.stomp.StompHeaders; import org

How configure the Spring Sockjs Java Client message converters

我怕爱的太早我们不能终老 提交于 2019-12-06 12:19:20
I have one SockJS Java client that use STOMP. Is base on this https://github.com/rstoyanchev/spring-websocket-portfolio/blob/master/src/test/java/org/springframework/samples/portfolio/web/load/StompWebSocketLoadTestClient.java . My code: package mx.intercommunication.websocket.stompclient; import org.springframework.messaging.converter.StringMessageConverter; import org.springframework.messaging.simp.stomp.StompCommand; import org.springframework.messaging.simp.stomp.StompHeaders; import org.springframework.messaging.simp.stomp.StompSession; import org.springframework.messaging.simp.stomp

Meteor, Modulus and secure websockets

泄露秘密 提交于 2019-12-06 08:02:12
Trying to get my head around websockets and xhr in a Meteor -> Modulus context. I've been noticing lengthy response times on occasion apparently due to websockets falling back to xhr when it can't connect...I'm trying to diagnose why. Production app is being hosted on Modulus. SSL enabled. Things I've done/checked so far Upgrade all the things: The app has been running at 1.0.2.1 (latest) but was originally created during the ~0.65 days. As first order of business I upgraded the standard-app-packages to meteor-platform packages and restarted the server. No change. Modulus: Check...Modulus does

How to combine Spring Security and js sockjs-client

≡放荡痞女 提交于 2019-12-06 04:54:28
问题 I want to create a Spring Server and a Broswer javascript client connecting via sockjs-client. The connection should be secured via Spring Security. I have the following dilemma: Spring Security seems to assume that the websocket handshake happens via an authenticated http session (E.g. JSESSIONID cookie set, login happened). sockjs-client however seems to impose the limitation on developers that no authenticated http session must be used (See https://github.com/sockjs/sockjs-client/issues

Configure External Broker(RabbitMQ) In Spring4+STOMP+SockJS Application

假装没事ソ 提交于 2019-12-06 02:05:20
问题 I am working on a chat application developed using Spring4 Messaging and STOMP implemented with SockJS. The application works fine when I use the Simple Message Broker : config.enableSimpleBroker("/queue/", "/topic/"); But, now we have a requirement to use an external broker(RabbitMQ) with the same application. For that, I changed the above code with the following: // config.enableSimpleBroker("/queue/", "/topic/"); config.enableStompBrokerRelay("/queue", "/topic"); My client side is

Websocket java client Spring + Stomp: Transport error: ConnectionLostException

泄露秘密 提交于 2019-12-05 20:06:24
I'm trying to create an standalone Java app as a websocket client using for this Spring with Stomp and Sockjs, taking in consideration the spring specifications and the spring-portafolio examples and I'm getting this error: 15:18:01.342 [main] DEBUG com.example.client.WebSocketClientTest - Connecting to : ws://localhost:8080/socket/hello 15:18:01.541 [WebSocketClient-AsyncIO-1] ERROR com.example.client.MyStompSessionHandler - Transport error org.springframework.messaging.simp.stomp.ConnectionLostException: Connection closed at org.springframework.messaging.simp.stomp.DefaultStompSession

SockJsException when websocket client connect to server

心不动则不痛 提交于 2019-12-05 16:25:05
I used spring 4.0.3 with websocket support, my spring config of websocket is: <websocket:message-broker application-destination-prefix="/kiford"> <websocket:stomp-endpoint path="/websocket"> <websocket:sockjs/> </websocket:stomp-endpoint> <websocket:simple-broker prefix="/queue, /topic"/> </websocket:message-broker> When my client connected to the server: this.socket = new SockJS('websocket/'); this.client = Stomp.over(this.socket); this.client.connect({}, success_callback, error_callback); The console of spring printed the following error messages: 2014-05-27 18:22:46.410 [http-apr-8080-exec