activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hereen Oh <her...@stormpath.com>
Subject Java, Stomp, & Web Sockets
Date Tue, 21 May 2013 19:43:19 GMT
Hi,

We are interested in using ActiveMQ's (v5.8.0) Web Socket transport with
Java.

We have been successful in bringing up a broker and running the included
javascript web socket demo. However, we're running into some
difficulty/confusion with how to proceed with Java.

1) Web socket connection
We were able to create a Java client that can listen and send messages to a
broker using the tcp transport.
<amq:connectionFactory id="connectionFactory" brokerURL="tcp://localhost:616
16"/>

However, when we switch to using the ws transport by changing the URL like
so:
<amq:connectionFactory id="connectionFactory"
brokerURL="ws://localhost:61614"  />

We get an error thrown from the TransportFactory class (line 158): "Could
not create Transport. Reason: java.io.IOException: createTransport() method
not implemented!"

Are we missing some additional changes in our configuration?

2) Stomp
There is seemingly clear documentation on how to use Stomp with scripting
languages but we're not sure what we should be doing for Java. The ActiveMQ
documentation (http://activemq.apache.org/stomp.html) mentions a provided
Stomp Java API but cautions users:
"Note that this API is provided purely for testing purposes and you should
always consider using standard JMS API from Java instead of this one."
Are we to look for some sort of bridging component between jms and stomp
(like stompjms (https://github.com/fusesource/stompjms) or stompj (
http://code.google.com/p/stompj/)?

What is the recommended solution for using Java with ActiveMQ's web sockets?

Any info would be appreciated.
Thanks,
-h



-- 
@goStormpath

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message