activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <>
Subject Re: Java, Stomp, & Web Sockets
Date Tue, 21 May 2013 20:22:20 GMT
1) you don't want to use ws:// for the client side within java.. that
transport's not implemented because it's intended for use in a WebSocket
enabled environment, ie, a browser. Just use the tcp://localhost:X where X
is the transportConnector configured to handle STOMP connections.

2) Use the StompJms code from fusesource. It's a more mature now, follows
the JMS API, and should be good to use.

So basically, juse StompJms from the Java side, use a websockets/stomp
library from the browser.

Good luck, let us know how it goes.

On Tue, May 21, 2013 at 12:43 PM, Hereen Oh <> wrote:

> 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: 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 ( 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 ( or stompj (
> What is the recommended solution for using Java with ActiveMQ's web
> sockets?
> Any info would be appreciated.
> Thanks,
> -h
> --
> @goStormpath

*Christian Posta*
twitter: @christianposta

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