stomp

Why does STOMP functionality in spring-websocket depend on Spring MVC?

怎甘沉沦 提交于 2020-01-13 19:42:10
问题 Currently, I am trying to use STOMP with websockets using webflux. In order to send a message to a STOMP topic, I need to use SimpMessagingTemplate , which is contributed by spring boot auto configuration when I add @EnableWebSocketMessageBroker But the problem with this is, @EnableWebSocketMessageBroker indirectly expects me to have spring-mvc library in classpath @EnableWebSocketMessageBroker @Import s DelegatingWebSocketMessageBrokerConfiguration which extends

AWS | Syntax error in module': invalid syntax

只愿长相守 提交于 2020-01-08 06:53:51
问题 I have created python script which is uploaded as a zip file in AWS Lambda function with stompy libraries bundled in them. Logs for python 2.7:- Response: null Request ID: "c334839f-ee46-11e8-8970-612f1dc92e41" Function Logs: START RequestId: c334839f-ee46-11e8-8970-612f1dc92e41 Version: $LATEST CONNECTION Started CONNECTION established CONNECTION Subscribed [WARNING] 2018-11-22T11:07:12.798Z c334839f-ee46-11e8-8970-612f1dc92e41 Unknown response frame type: '' (frame length was 3) END

AWS | Syntax error in module': invalid syntax

偶尔善良 提交于 2020-01-08 06:53:06
问题 I have created python script which is uploaded as a zip file in AWS Lambda function with stompy libraries bundled in them. Logs for python 2.7:- Response: null Request ID: "c334839f-ee46-11e8-8970-612f1dc92e41" Function Logs: START RequestId: c334839f-ee46-11e8-8970-612f1dc92e41 Version: $LATEST CONNECTION Started CONNECTION established CONNECTION Subscribed [WARNING] 2018-11-22T11:07:12.798Z c334839f-ee46-11e8-8970-612f1dc92e41 Unknown response frame type: '' (frame length was 3) END

Java Spring STOMP: Set broker IP

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-07 05:33:05
问题 I have a Java application using Spring that uses Websocket, which works fine as long as RabbitMQ runs in the same machine as tomcat. How can I set the IP for RabbitMQ ? I am reading the documentation and I don't find it. My current configuration is very similar to the one in the documentation <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:websocket="http://www.springframework.org/schema/websocket" xsi:schemaLocation="

Accessing a request scoped bean in a different thread (that handles websocket traffic)

血红的双手。 提交于 2020-01-06 05:51:06
问题 I am having issues accessing a bean that is defined with a request centric scope in a thread that is not the request's thread. My scenario is as follows: Execution starts from a REST request coming from a client. In this request I define a bean that allows me to access data in a DB. The location of the DB depends on the user performing the request itself, hence why the bean with which the db is accessed is bound to the request itself. I get the user details from the request's auth and use

Accessing native headers on StompHeaderAccessor

故事扮演 提交于 2020-01-06 03:19:15
问题 I'm building a chat server. I am using the following code to extract the username of a new user connection. It works, but it doesn't feel like the proper way to do this. How do I do this properly? @EventListener public void handleWebSocketConnectListener(SessionConnectedEvent event) { StompHeaderAccessor stompAccessor = StompHeaderAccessor.wrap(event.getMessage()); GenericMessage connectHeader = (GenericMessage)stompAccessor.getHeader(SimpMessageHeaderAccessor.CONNECT_MESSAGE_HEADER); //

Communicating between PHP and Java using ActiveMQ/Stomp

跟風遠走 提交于 2020-01-04 02:42:08
问题 Background I have two services that need to communicate with each other over a message queue. One is a legacy service written in PHP and the other is in Java. Sooner than later, the PHP service will be rewritten in Java. The current way they communicate with each other is to write to a shared database, which the other service polls. This is what I'm trying to get away from and replace with a message queue. Problem The communication I'm working on right now is from the PHP service to the Java

SubProtocolWebSocketHandler - No handlers

对着背影说爱祢 提交于 2020-01-03 04:40:06
问题 I have this ugly error during deploying Spring app on JBoss. 18:11:16,025 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/consumer]] (MSC service thread 1-7) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.context.ApplicationContextException: Failed to start bean 'subProtocolWebSocketHandler'; nested exception is java.lang.IllegalArgumentException: No handlers at org

How can I schedule a “push” of client-specified data every few seconds using a Spring Boot WebSocket controller?

依然范特西╮ 提交于 2020-01-01 19:58:31
问题 How can I schedule a "push" of specified data every few seconds using a Spring Boot WebSocket controller? I currently have the following code: @Controller public class ServiceWebSocketController { @Autowired private ServiceService serviceService; @Autowired private SimpMessagingTemplate simpMessagingTemplate; // This method works great, but a response is only sent to the client once. @SubscribeMapping("/service/{serviceId}") public ServiceDTO subscribed(@DestinationVariable("serviceId") final

How to secure websocket application [Spring boot + STOMP]

天涯浪子 提交于 2020-01-01 10:15:07
问题 Good morning, I've created a simple Spring Boot WebSocket application. Right now I would like to set some security to it. I've trying some examples but I cannot get it worked. I'm getting error: web browser: >>> CONNECT ${_csrf.headerName}:${_csrf.token} accept-version:1.1,1.0 heart-beat:10000,10000 <<< ERROR message:Failed to send message to ExecutorSubscribableChannel[clientInboundChannel]; nested exception is org.springframework.security.web.csrf.MissingCsrfTokenException\c Could not