activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmathrusse <Christopher.Mathru...@sybase.com>
Subject Message is not delivered and disappears
Date Thu, 08 Mar 2007 23:49:27 GMT

I've got ActiveMQ 4.1.0 running successfully. (or so I think) I've got my
application connecting to it without any problems, utilizing Springs
framework. The problem I'm having is when I attempt to send a message to the
queue I receive the following in the activeMq.log file:
 
DEBUG AbstractRegion                 - Adding consumer:
ID:CMATHRUSXP-2147-1173384522352-1:9:14:1
DEBUG Transport                      - Transport failed:
java.net.SocketException: Connection reset
java.net.SocketException: Connection reset
 at java.net.SocketInputStream.read(SocketInputStream.java:168)
 at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:49)
 at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:56)
 at java.io.DataInputStream.readInt(DataInputStream.java:353)
 at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267)
 at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156)
 at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
 at java.lang.Thread.run(Thread.java:595)
DEBUG TransportConnection            - Stopping connection:
/172.17.2.128:2163
DEBUG TransportConnection            - Cleaning up connection resources.
DEBUG AbstractRegion                 - Removing consumer:
ID:CMATHRUSXP-2162-1173384593890-1:0:-1:1
DEBUG TransportConnection            - Stopped connection:
/172.17.2.128:2163
 
 
I've attached my simple java client. It is very similar to the
SimpleProducer that is published here:
http://activemq.apache.org/jndi-support.html
The only difference is that my InitialContext is created using a properties
object and supplying the InitialContextFactory and ProviderURL. The client
appears to connect successfully and sends a message successfully without
exceptions on the client, but I see the above exception on the server. In
addition, the message never gets received by the consumer.
 
Interestingly enough, if I change my client code from:
ctx.lookup(queueName);
 
to:
session.createQueue(queueName);
 
The message gets received by the consumer. Oddly, the above exception
message is still produced in my servers log file, but the message gets
delivered correctly. 
 
I've configured in the activemq.xml file my queues so they are started when
the broker starts as follows:
    <destinations>
     <queue name="order.request.queue" physicalName="order.request.queue"/>
     <queue name="order.confirm.queue" physicalName="order.confirm.queue"/>
    </destinations>
 
but my client cannot seem to locate them using the
ctx.looup("order.request.queue") method, so I'm using the dynamic queue
lookup instead: ctx.looup("dynamicQueues/order.request.queue") 
but I don't think that has anything to do with why the message is not
delivered.
As listed above, if I use the createQueue method things work, but if I use
the ctx.lookup things don't. The reason it is so important to get this to
work is because I have a 3rd party application that will be sending messages
via JMS and it is using the ctx.lookup method, which is failing for me.

Any help would be greatly appreciated. Thanks....

 
http://www.nabble.com/file/7050/JMSClient.java JMSClient.java 
-- 
View this message in context: http://www.nabble.com/Message-is-not-delivered-and-disappears-tf3371445s2354.html#a9381531
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message