1 Reply Latest reply on Aug 2, 2011 7:04 AM by Gary Tully

    temp-queue destination does not exist exception with MB 5.5.0-fuse-00-43

    Aaron Riekenberg Newbie

      I just tried to step up to 4.4.0-fuse-00-43 of FUSE ESB which includes MB 5.5.0-fuse-00-43.  I am seeing an exception like "The destination temp-queue://ID:mwgk-53969-1311970399608-4:1:1 does not exist" when I attempt to use Camel's ProducerTemplate.requestBody to send a message over JMS and wait for a response to come back on a temp queue.

       

      I am attaching a small test program that shows this problem.  This program creates a Requestor bean instance which has 2 threads - one thread publishes to a JMS topic using ProducerTemplate.sendBody.  The other thread calls ProducerTemplate.requestBody to send a request over a JMS queue and wait for a response on a temp queue.  A Server bean instance is created which uses an @Consume annotation to receive from the request topic and send back a response.

       

      If I run this with MB 5.5.0-fuse-00-43 I get exceptions like the one pasted below and the Requestor never receives any responses from requestBody (it times out after 20 seconds).

       

      If I run this with MB 5.5.0-fuse-00-39 it works without exceptions.

       

      If I run this with MB 5.5.0-fuse-00-43 and comment out the code in Requestor.publishToTestTopic it works without exceptions.

       

      I think this problem is caused by this bug fix: https://issues.apache.org/jira/browse/AMQ-2349  This bug added code to PooledConnection to destroy temp destinations with a PooledConnection is closed.  I think what's happening in my test program is both threads in the Requestor are sharing one PooledConnection.  After publishToTestTopic calls sendBody, Camel calls close on the shared PooledConnection and this destroys the temp queue being used by the other thread calling requestBody.

       

      Here is the exception I get running the test program with MB 5.5.0-fuse-00-43:

       

      15:13:22,751 [Camel Thread 0 - JmsConsumer WARN   Execution of JMS message listener failed, and no ErrorHandler has been set.

      org.apache.camel.RuntimeCamelException: org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: The destination temp-queue://ID:mwgk-53969-1311970399608-4:1:1 does not exist.

      at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)

      at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:149)

      at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)

      at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)

      at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)

      at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)

      at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)

      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)

      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)

      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

      at java.lang.Thread.run(Thread.java:662)

      Caused by: org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: The destination temp-queue://ID:mwgk-53969-1311970399608-4:1:1 does not exist.

      at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)

      at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)

      at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)

      at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:180)

      at org.apache.camel.component.jms.EndpointMessageListener.sendReply(EndpointMessageListener.java:287)

      at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:141)

      ... 11 more

      Caused by: javax.jms.JMSException: The destination temp-queue://ID:mwgk-53969-1311970399608-4:1:1 does not exist.

       

      Edited by: ariekenb on Jul 29, 2011 9:11 PM