【发布时间】:2016-08-09 16:37:01
【问题描述】:
我需要在wildfly 9中通过websocket配置STOMP。到目前为止我做了什么,
- 在网上获得帮助后,我在standalone-full.xml 中添加了连接器/接受器,用于通过 websocket 配置 STOMP。配置如下所示:
并为其添加套接字绑定(端口 61614)。
通过此配置,wildfly 9 启动。但我无法通过 websocket 连接到 STOMP。尝试通过 ws://localhost:61614/stomp 使用 java websocket 客户端进行连接。但无法使用相同的连接。我还尝试使用 javascript STOMP 客户端库进行连接。但结果是相同的,无法使用相同的连接。 (如此处所述,http://jmesnil.net/stomp-websocket/doc/)
在此之后,我尝试在接受器配置中添加 STOMP_WS 协议:
但是当我用这个启动 Wildfly 9 时,我会导致错误提示“错误实例化远程接受器 org.hornetq.core.remoting.impl.netty.Netty.NettyAcceptorFactory: HornetQException[errorType=GENERIC_EXCEPTION message=HQ119085: Classpath缺少一个STOMP_WS 协议的协议管理器]"
另一件事是当我启动 wildfly 9 时,我在日志中看到以下行,
10:37:33,866 INFO [org.hornetq.core.server] (ServerService 线程池 -- 64) HQ221043: 添加协议支持 CORE 10:37:33,878 INFO [org.hornetq.core.server](ServerService 线程池 -- 64)HQ221043:添加协议支持 AMQP 10:37:33,881 INFO [org.hornetq.core.server](ServerService 线程池 -- 64)HQ221043:添加协议支持 STOMP
但我认为 STOMP_WS 协议不一样。
所以我的问题是, 1、wildfly 9如何配置STOMP_WS? 2. 如果我只用netty connector/acceptor配置STOMP,是不是说是STOMP over websocket?
我已经在 Wildfly 8,9 和 10 中尝试了所有这些,并且在每个版本中都观察到了相同的情况。
非常感谢任何帮助!
【问题讨论】:
标签: websocket hornetq stomp wildfly-9