stomp

PHP Stomp client library for ActiveMQ + WebSockets

99封情书 提交于 2019-12-08 10:28:09
问题 I've installed ActiveMQ with WebSocket support and I'm able to get the JS demo working. The issue that I'm facing right now is that the PHP Stomp library won't work with the WebSocket URI so when I try: $stomp = new Stomp('ws://localhost:61614'); I get: Connection failed: Invalid Broker URI scheme Any thoughts on how I can send messages via PHP? Am I looking at this from the wrong angle. Should I try regular PHP socket functions to connect to ActiveMQ ? Thanks. 回答1: Yes, from PHP you should

Angular2 with Stomp.js

天大地大妈咪最大 提交于 2019-12-08 09:00:34
I'm looking for Stomp.js or similar libs. I not found working with angular2.rc6/final example or lib. How can I reaplace Stomp.js something else? In my previously project with Angular 1.X I used Stomp.js with Sock. I'm in stuck.. UPDATE I tried with this example application but but without effect. This example is outdated. https://github.com/sjmf/ng2-stompjs-demo If you are using new version of angular2 CLI https://cli.angular.io/ I would recommend to use STOMP-Over-WebSocket Service for angular 2 Install this npm packages npm i --save stompjs npm i --save sockjs-client npm i --save ng2-stomp

How to use ExecutorSubscribableChannel

£可爱£侵袭症+ 提交于 2019-12-08 08:19:31
问题 Related with the question autowire simpmessagingtemplate I am having problem the class ExecutorSubscribableChannel. I want the server to send a asynchronous message to the browser. How can I use properly ExecutorSubscribableChannel ? Example: public class GreetingController { @Autowired private SimpMessagingTemplate template; public void setTemplate(SimpMessagingTemplate template) { this.template = template; } @MessageMapping("/hello") @SendTo("/topic/greetings") public Greeting greeting

Php Can't find Stomp class

僤鯓⒐⒋嵵緔 提交于 2019-12-08 07:07:09
问题 I'm trying to get a queue from activemq using a PHP client. I included in the project a stomp library. Here is my project tree: TestPhp/ ├── PhpInfo.php ├── SimpleStompConsumer.php └── Stomp ├── Exception | └── StompException.php ├── ExceptionInterface.php ├── Frame.php ├── Message │ ├── Bytes.php │ └── Map.php ├── Message.php └── Stomp.php and here is my code <?php $path = "/var/www/test/TestPhp/Stomp/Stomp.php"; require_once($path); $con = new Stomp("tcp://localhost:61613"); $con->connect()

Securing a Spring messaging based websocket service

橙三吉。 提交于 2019-12-08 06:46:02
问题 I am working on this for 3 weeks now without a real solution and I really hope you can help me out. A bit project background: Webapp with a JavaScript/PHP based Client sends via SocksJS and Stomp a message to a "gate" The gate is written in Java/Spring and uses @SendTo and @MessageMapping to send and recieve messages The messages from the gate are sent to RabbitMQ and back to the client via "messageBrokerRegistry.enableStompBrokerRelay" So far it works, messages being sent are coming back.

Angular2 with Stomp.js

僤鯓⒐⒋嵵緔 提交于 2019-12-08 04:51:07
问题 I'm looking for Stomp.js or similar libs. I not found working with angular2.rc6/final example or lib. How can I reaplace Stomp.js something else? In my previously project with Angular 1.X I used Stomp.js with Sock. I'm in stuck.. UPDATE I tried with this example application but but without effect. This example is outdated. https://github.com/sjmf/ng2-stompjs-demo 回答1: If you are using new version of angular2 CLI https://cli.angular.io/ I would recommend to use STOMP-Over-WebSocket Service for

Spring Boot - Websockets - How to see subscribers

北战南征 提交于 2019-12-08 03:46:26
I'm working on a websocket application where I'm trying to have one websocket that feeds information in, and then outputs to subscribers to the endpoint. I've figure that out, but I'm wondering if there is a way to see what subscribers are subscribed and to what path? Here is a code sample of what I'm working on. @Autowired private SimpMessagingTemplate template; @MessageMapping("/{companyId}/{departmentId}") @SendTo("/{companyId}/{departmentId}") public void companyInformation(@DestinationVariable String companyId, @DestinationVariable String departmentId, CompanyMessage companyMessage){

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

Spring 4 WebSockect over STOMP Authentication

与世无争的帅哥 提交于 2019-12-07 15:45:02
问题 I'm developing a multiplayer game based on Spring 4 WebSocket. my server is stateless so in order to identify players i use tokens. after struggling for sometime with how to identify players over WebSockets i came up with this solution: on the client player registers like this: var sockjs = new SockJS("http://mygame/games/", null, {server : token}); this adds the token to the url, I have set up a filter using spring security: String requestURI = request.getRequestURI(); String[] parts =

Spring+WebSocket+STOMP. Message to specific session (NOT user)

三世轮回 提交于 2019-12-07 12:12:43
问题 I am trying to set up basic message broker on Spring framework, using a recipe I found here Author claims it has worked well, but I am unable to receive messages on client, though no visible errors were found. Goal: What I am trying to do is basically the same - a client connects to server and requests some async operation. After operation completes the client should receive an event. Important note: client is not authenticated by Spring, but an event from async back-end part of the message