This discussion is archived
1 Reply Latest reply: May 26, 2011 10:15 PM by ak RSS

Unable to get Apache NMS stomp to work on OpenMQ

807581 Newbie
Currently Being Moderated
Hi All,

I am using NMS Stomp 1.3 to connect to OpenMQ. While i managed to get the queue sending working correctly after I did some modifications to the original code, I am unable to get the queue retrieval working. The server ends with the following error :

SEVERE: Exception occured when executing asynchronous queue writing
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
at sun.nio.ch.IOUtil.write(IOUtil.java:75)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
at com.sun.grizzly.async.TCPAsyncQueueWriter.doWrite(TCPAsyncQueueWriter.java:88)
at com.sun.grizzly.async.AbstractAsyncQueueWriter.doWrite(AbstractAsyncQueueWriter.java:430)
at com.sun.grizzly.async.AbstractAsyncQueueWriter.onWrite(AbstractAsyncQueueWriter.java:328)
at com.sun.grizzly.async.AsyncQueueWriterContextTask.doCall(AsyncQueueWriterContextTask.java:75)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.FixedThreadPool$BasicWorker.dowork(FixedThreadPool.java:379)
at com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:360)
at java.lang.Thread.run(Thread.java:619)

I wonder if there is any available .NET Stomp API to connect to OpenMQ as the original NMS Stomp API 1.3 seems to fail on OpenMQ 4.4u2. Thanks a lot.
  • 1. Re: Unable to get Apache NMS stomp to work on OpenMQ
    ak Explorer
    Currently Being Moderated
    When Apache NMS (Apache.NMS.Stomp-1.5.1) uses codehaus StompConnect as the bridge to OpenMQ,
    http://stomp.codehaus.org/StompConnect
    the same connection reset error (see below), in StompConnect, happens as well. So please bring the issue to Apache NMS support
    http://activemq.apache.org/nms/nms.html
    for OpenMQ is a JMS compliant product.

    OpenMQ does not currenlty provide .NET STOMP API but one can write STOMP .NET client using .NET framework directly to talk to OpenMQ 4.4 or later broker, like in this C# example
    http://mq.java.net/stomp-example.zip
    Please see details in OpenMQ documentation
    http://download.oracle.com/docs/cd/E18930_01/html/821-2438/gjdkc.html

    --------Apache NMS (Apache.NMS.Stomp-1.5.1) using codehaus StompConnect + OpenMQ when run NMS async example (uri "stomp:tcp//<StompConnect-host>:<StompConnect-port>") http://activemq.apache.org/nms/examples.html
    May 24, 2011 1:29:35 PM org.codehaus.stomp.jms.ProtocolConverter onException
    SEVERE: Caught: java.net.SocketException: Connection reset
    java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at org.codehaus.stomp.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
    at org.codehaus.stomp.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
    at java.io.DataInputStream.readByte(DataInputStream.java:248)
    at org.codehaus.stomp.StompMarshaller.readLine(StompMarshaller.java:189)
    at org.codehaus.stomp.StompMarshaller.unmarshal(StompMarshaller.java:94)
    at org.codehaus.stomp.tcp.TcpTransport.run(TcpTransport.java:130)
    at java.lang.Thread.run(Thread.java:619)