I need to configure STOMP over websocket inside wildfly 9. What I did so far,
And adde socket-bindings for the same (port 61614).
With this configuration, wildfly 9 starts. But I am not able to connect to STOMP over websocket. Trying to connect using java websocket client over ws://localhost:61614/stomp. But not able to connect using the same. I also tried using the javascript STOMP client library to connect. But result is same and not able to connect using same. (As described here, http://jmesnil.net/stomp-websocket/doc/)
Now after this, I tried adding STOMP_WS protocol on acceptor configuration:
But when I start Wildfly 9 with this, I results in error saying "Error instantiating remoting acceptor org.hornetq.core.remoting.impl.netty.Netty.NettyAcceptorFactory: HornetQException[errorType=GENERIC_EXCEPTION message=HQ119085: Classpath lacks a protocol-manager for protocol STOMP_WS]"
One other thing is when I start wildflly 9, I see following lines in logs,
10:37:33,866 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 64) HQ221043: Adding protocol support CORE 10:37:33,878 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 64) HQ221043: Adding protocol support AMQP 10:37:33,881 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 64) HQ221043: Adding protocol support STOMP
But I don't see same for STOMP_WS protocol.
So my question is, 1. How to configure STOMP_WS in wildfly 9? 2. If I only configure STOMP with netty connector/acceptor, does that mean it is STOMP over websocket?
I have tried all this in Wildfly 8,9 and 10 and same things is observed in each versions.
Any help is very much appreciated!!
This issue is fixed after changing Netty jar in Wildfly 9. Earlier it was netty-all-4.0.26.Final.jar. I replaced it with netty-all-4.0.13.Final.jar. Now I am able to connect to STOMP over websocket with following configuration:
<netty-acceptor name="netty-acceptor" socket-binding="netty">
<param key="protocols" value="STOMP"/>
</netty-acceptor>
NOTE: I didn't use STOMP_WS protocol.