You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Alan Smithee <h1...@yahoo.com> on 2013/01/10 23:19:56 UTC

Jetty to ActiveMQ Failure

I am seeing the exception listed below after running a fairly straightforward
load test against jetty/activemq/camel. As best as I can make out, it occurs
only after I have run the test a few times (i.e.
start,finish,start,finish,start,exception), at which time all connections in
the test fail. One variable that seems to make a difference is how I define
the jms bean in the spring config. For performance reasons, I would really
like to use the maxConnections and concurrentConsumers values, but this
exception seems to only happen when I use the config that has those values.

I'd be willing to share the project with interested parties if it's helpful
(its a fairly simple maven project)

Details below....


My Route

from("jetty:http://localhost:8085/incoming?sessionSupport=true").routeId("Jetty
Endpoint to ActiveMQ")
																		.to("jms:incoming");

		from("jms:incoming").routeId("ActiveMQ Incoming")
									.unmarshal(customGsonParser)
									.beanRef("dispatcher", "dispatch")
									.marshal(customGsonParser);

My JMS Config That Does Not Produce The Exception

<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
		<property name="connectionFactory">
			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
				<property name="brokerURL" value="tcp://localhost:61616" />
			</bean>
		</property>
	</bean>

My JMS Config That Produces The Exception

<bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
		<property name="brokerURL" value="tcp://localhost:61616" />
	</bean>

	<bean id="pooledConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory"
		init-method="start" destroy-method="stop">
		<property name="maxConnections" value="100" />
		<property name="connectionFactory" ref="jmsConnectionFactory" />
	</bean>

	<bean id="jmsConfig"
class="org.apache.camel.component.jms.JmsConfiguration">
		<property name="connectionFactory" ref="pooledConnectionFactory" />
		<property name="concurrentConsumers" value="50" />
	</bean>

   <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
		<property name="configuration" ref="jmsConfig" />
	</bean>

System Details

java version : "1.7.0_07"
MacOS : 10.8.2
maven-jetty-plugin : 6.1.26
Jetty : 7.5.4.v20111024
Camel : 2.10.2
Apache ActiveMQ : 5.7.0

The Exception:

[INFO] Started Jetty Server
2013-01-10 16:53:54,426 [er[temporary]-1] WARN 
efaultMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'temporary' - trying to recover. Cause: The Consumer
is closed
2013-01-10 16:53:54,430 [er[temporary]-1] INFO  PooledConnection              
- failed to delete Temporary Queue
"temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1" on closing
pooled connection: The connection is already closed
2013-01-10 16:53:54,432 [sumer[incoming]] WARN 
ultJmsMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'incoming' - trying to recover. Cause: The Consumer
is closed
2013-01-10 16:53:54,447 [sumer[incoming]] INFO 
ultJmsMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-10 16:53:54,451 [er[temporary]-1] INFO 
efaultMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-10 16:53:54,462 [sumer[incoming]] WARN  EndpointMessageListener       
- Execution of JMS message listener failed. Caused by:
[org.apache.camel.RuntimeCamelException -
org.springframework.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1; nested
exception is javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1]
org.apache.camel.RuntimeCamelException:
org.springframework.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1; nested
exception is javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1270)
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:125)
	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.runWorker(ThreadPoolExecutor.java:1110)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.jms.InvalidDestinationException: Cannot
publish to a deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1; nested
exception is javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1
	at
org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:285)
	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:198)
	at
org.apache.camel.component.jms.EndpointMessageListener.sendReply(EndpointMessageListener.java:353)
	at
org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:206)
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:108)
	... 11 more
Caused by: javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1
	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1731)
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:277)
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:212)
	at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:79)
	at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:62)
	at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:592)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSend(JmsConfiguration.java:276)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:215)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:157)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$4.doInJms(JmsConfiguration.java:200)
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
	... 15 more
2013-01-10 16:54:15,428 [ecker[incoming]] WARN  TemporaryQueueReplyManager    
- Timeout occurred after 20000 millis waiting for reply message with
correlationID [ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450553].
Setting ExchangeTimedOutException on (MessageId:
ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450550 on ExchangeId:
ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450549) and continue routing.
2013-01-10 16:54:15,431 [ecker[incoming]] ERROR DefaultErrorHandler           
- Failed delivery for (MessageId:
ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450550 on ExchangeId:
ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450549). Exhausted after
delivery attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The
OUT message was not received within: 20000 millis due reply message with
correlationID: ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450553 not
received. Exchange[Message: [Body is instance of
org.apache.camel.StreamCache]]
org.apache.camel.ExchangeTimedOutException: The OUT message was not received
within: 20000 millis due reply message with correlationID:
ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450553 not received.
Exchange[Message: [Body is instance of org.apache.camel.StreamCache]]
	at
org.apache.camel.component.jms.reply.ReplyManagerSupport.processReply(ReplyManagerSupport.java:133)
	at
org.apache.camel.component.jms.reply.TemporaryQueueReplyHandler.onTimeout(TemporaryQueueReplyHandler.java:61)
	at
org.apache.camel.component.jms.reply.CorrelationTimeoutMap.onEviction(CorrelationTimeoutMap.java:53)
	at
org.apache.camel.component.jms.reply.CorrelationTimeoutMap.onEviction(CorrelationTimeoutMap.java:30)
	at
org.apache.camel.support.DefaultTimeoutMap.purge(DefaultTimeoutMap.java:203)
	at
org.apache.camel.support.DefaultTimeoutMap.run(DefaultTimeoutMap.java:159)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)




--
View this message in context: http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Jetty to ActiveMQ Failure

Posted by Christian Müller <ch...@gmail.com>.
Use the option requestTimeoutCheckerInterval=70 (or another value which
fits best for you).

Best,
Christian

On Fri, Jan 11, 2013 at 7:57 PM, Alan Smithee <h1...@yahoo.com> wrote:

> As a followup, I tried using a shared queue (with the receiveTimeout dialed
> way down) and the performance was really poor (like 1000ms per message for
> shared vs 70ms with temp or exclusive queues), but no fatal exceptions.
>
> Let me know if I can help diagnose this temp queue failure issue.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323p5725421.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Re: Jetty to ActiveMQ Failure

Posted by Alan Smithee <h1...@yahoo.com>.
As a followup, I tried using a shared queue (with the receiveTimeout dialed
way down) and the performance was really poor (like 1000ms per message for
shared vs 70ms with temp or exclusive queues), but no fatal exceptions.

Let me know if I can help diagnose this temp queue failure issue.

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323p5725421.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Jetty to ActiveMQ Failure

Posted by mferor76 <to...@yahoo.com>.
I had the same issue.  After reading this I got the idea to use this config
for my PooledConnectionFactory and it works

    <bean id="pooledConnectionFactory"
          class="org.apache.activemq.pool.PooledConnectionFactory"
          init-method="start"
          destroy-method="stop">
        <property name="maxConnections" value="8" />
        <property name="connectionFactory" ref="jmsConnectionFactory" />
        <property name="expiryTimeout" value="-1" />
        <property name="idleTimeout" value="-1" />
    </bean>

    <bean id="jmsConfig" 
class="org.apache.camel.component.jms.JmsConfiguration">
        <property name="connectionFactory" ref="pooledConnectionFactory"/>
        <property name="concurrentConsumers" value="8"/>
    </bean>

    <bean id="jms"
class="org.apache.activemq.camel.component.ActiveMQComponent">
        <property name="configuration" ref="jmsConfig"/>
    </bean>

In the javadoc it says that the expiryTimeout is used to for activemq
failover.  Although I haven't test it I have hope that this would still work
since when I restart activemq it seemlessly reconnects as I would expect.

HTH



--
View this message in context: http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323p5730248.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Jetty to ActiveMQ Failure

Posted by Alan Smithee <h1...@yahoo.com>.
I upgraded to 2.10.4-SNAPSHOT and 2.11-SNAPSHOT (see if my repo maven config
looks ok...I only changed the MVN version, and stopped using exclusive
queues on the route).

I was able to reproduce the exception right away on both 2.10.4-SNAPSHOT and
2.11-SNAPSHOT, but I think the exception messages are slightly different
(maybe not....well, I included both below anyway). 

Bummer.

Maven Info

<repositories>
		<repository>
			<id>apache.snapshots</id>
			<name>Apache Development Snapshot Repository</name>
			<url>https://repository.apache.org/content/repositories/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>


2.11-SNAPSHOT Exception

[INFO] Started Jetty Server
2013-01-11 21:32:24,383 [sumer[incoming]] WARN 
ultJmsMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'incoming' - trying to recover. Cause: The Consumer
is closed
2013-01-11 21:32:24,404 [0.1:50154@61616] WARN  Transport                     
- Transport Connection to: tcp://127.0.0.1:50154 failed:
java.io.EOFException
2013-01-11 21:32:24,426 [sumer[incoming]] INFO 
ultJmsMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-11 21:35:26,757 [er[temporary]-1] WARN 
efaultMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'temporary' - trying to recover. Cause: The Session
is closed
2013-01-11 21:35:26,759 [er[temporary]-1] INFO  PooledConnection              
- failed to delete Temporary Queue
"temp-queue://ID:ks-macbook-pro-50153-1357957893682-3:3:1" on closing pooled
connection: The connection is already closed
2013-01-11 21:35:26,763 [sumer[incoming]] WARN 
ultJmsMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'incoming' - trying to recover. Cause: The Session is
closed
2013-01-11 21:35:26,773 [sumer[incoming]] INFO 
ultJmsMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-11 21:35:26,775 [er[temporary]-1] INFO 
efaultMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-11 21:35:26,784 [sumer[incoming]] WARN  EndpointMessageListener       
- Execution of JMS message listener failed. Caused by:
[org.apache.camel.RuntimeCamelException -
org.springframework.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:ks-macbook-pro-50153-1357957893682-3:3:1; nested exception
is javax.jms.InvalidDestinationException: Cannot publish to a deleted
Destination: temp-queue://ID:ks-macbook-pro-50153-1357957893682-3:3:1]
org.apache.camel.RuntimeCamelException:
org.springframework.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:ks-macbook-pro-50153-1357957893682-3:3:1; nested exception
is javax.jms.InvalidDestinationException: Cannot publish to a deleted
Destination: temp-queue://ID:ks-macbook-pro-50153-1357957893682-3:3:1
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1310)
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:125)
	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.runWorker(ThreadPoolExecutor.java:1110)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.jms.InvalidDestinationException: Cannot
publish to a deleted Destination:
temp-queue://ID:ks-macbook-pro-50153-1357957893682-3:3:1; nested exception
is javax.jms.InvalidDestinationException: Cannot publish to a deleted
Destination: temp-queue://ID:ks-macbook-pro-50153-1357957893682-3:3:1
	at
org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:285)
	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:198)
	at
org.apache.camel.component.jms.EndpointMessageListener.sendReply(EndpointMessageListener.java:353)
	at
org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:206)
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:108)
	... 11 more
Caused by: javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:ks-macbook-pro-50153-1357957893682-3:3:1
	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1731)
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:277)
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:212)
	at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:79)
	at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:62)
	at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:592)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSend(JmsConfiguration.java:276)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:215)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:157)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$4.doInJms(JmsConfiguration.java:200)
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
	... 15 more







2.10.4-SNAPSHOT Exception

[INFO] Started Jetty Server
2013-01-11 21:28:26,882 [er[temporary]-1] WARN 
efaultMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'temporary' - trying to recover. Cause: The Consumer
is closed
2013-01-11 21:28:26,885 [er[temporary]-1] INFO  PooledConnection              
- failed to delete Temporary Queue
"temp-queue://ID:ks-macbook-pro-49748-1357957497880-3:3:1" on closing pooled
connection: The connection is already closed
2013-01-11 21:28:26,888 [sumer[incoming]] WARN 
ultJmsMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'incoming' - trying to recover. Cause: The Session is
closed
2013-01-11 21:28:26,901 [sumer[incoming]] INFO 
ultJmsMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-11 21:28:26,902 [er[temporary]-1] INFO 
efaultMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-11 21:28:26,913 [sumer[incoming]] WARN  EndpointMessageListener       
- Execution of JMS message listener failed. Caused by:
[org.apache.camel.RuntimeCamelException -
org.springframework.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:ks-macbook-pro-49748-1357957497880-3:3:1; nested exception
is javax.jms.InvalidDestinationException: Cannot publish to a deleted
Destination: temp-queue://ID:ks-macbook-pro-49748-1357957497880-3:3:1]
org.apache.camel.RuntimeCamelException:
org.springframework.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:ks-macbook-pro-49748-1357957497880-3:3:1; nested exception
is javax.jms.InvalidDestinationException: Cannot publish to a deleted
Destination: temp-queue://ID:ks-macbook-pro-49748-1357957497880-3:3:1
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1271)
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:125)
	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.runWorker(ThreadPoolExecutor.java:1110)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.jms.InvalidDestinationException: Cannot
publish to a deleted Destination:
temp-queue://ID:ks-macbook-pro-49748-1357957497880-3:3:1; nested exception
is javax.jms.InvalidDestinationException: Cannot publish to a deleted
Destination: temp-queue://ID:ks-macbook-pro-49748-1357957497880-3:3:1
	at
org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:285)
	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:198)
	at
org.apache.camel.component.jms.EndpointMessageListener.sendReply(EndpointMessageListener.java:353)
	at
org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:206)
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:108)
	... 11 more
Caused by: javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:ks-macbook-pro-49748-1357957497880-3:3:1
	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1731)
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:277)
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:212)
	at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:79)
	at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:62)
	at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:592)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSend(JmsConfiguration.java:276)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:215)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:157)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$4.doInJms(JmsConfiguration.java:200)
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
	... 15 more




--
View this message in context: http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323p5725432.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Jetty to ActiveMQ Failure

Posted by Christian Müller <ch...@gmail.com>.
It would be great if you could test your setup with Camel 2.10.4-SNAPSHOT
or 2.11-SNAPSHOT. With this version you should be able to use request/reply
with temp. queues without a problem (see
https://issues.apache.org/jira/browse/CAMEL-5865).
Camel 2.11.0 will probably be available in the next 2 - 3 weeks if nothing
bad happens...

Best,
Christian

On Fri, Jan 11, 2013 at 5:57 PM, Alan Smithee <h1...@yahoo.com> wrote:

> Ok. I'll look into that.
>
> Is there a problem using temporary queues? A bug I can help diagnose?
>
> My test is using 50 threads to push about 100,000 JSON messages into a
> jetty
> endpoint (over http). The message calls a simple routine that provides a
> response. I get about 70ms round trip and the whole process lasts about 2.5
> minutes. I'm happy with the results, it's just when it ends, I wait about
> 2-3 minutes and start it up again and the exception occurs. I have to start
> the entire camel instance to get things back to normal. It almost seems
> like
> it is trying to re-use temporary channels even though the original client
> has already used the channel and is gone.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323p5725412.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Re: Jetty to ActiveMQ Failure

Posted by Alan Smithee <h1...@yahoo.com>.
Ok. I'll look into that.

Is there a problem using temporary queues? A bug I can help diagnose?

My test is using 50 threads to push about 100,000 JSON messages into a jetty
endpoint (over http). The message calls a simple routine that provides a
response. I get about 70ms round trip and the whole process lasts about 2.5
minutes. I'm happy with the results, it's just when it ends, I wait about
2-3 minutes and start it up again and the exception occurs. I have to start
the entire camel instance to get things back to normal. It almost seems like
it is trying to re-use temporary channels even though the original client
has already used the channel and is gone.



--
View this message in context: http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323p5725412.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Jetty to ActiveMQ Failure

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jan 11, 2013 at 5:42 PM, Alan Smithee <h1...@yahoo.com> wrote:
> You read my mind :-)
>
>
> from("jetty:http://localhost:8085/incoming?sessionSupport=true").routeId("Jetty
> Endpoint to ActiveMQ")
> .setExchangePattern(ExchangePattern.InOut)
> .to("activemq:incoming?replyTo=outgoing&replyToType=Exclusive");
>
> I have not been able to reproduce the full "stop the world" exception yet.
> But the message below did come up and I was able to continue testing through
> it. My concern with using Exclusive queues is that I lose full
> clusterability (I kind of need it).
>

Then you can use shared queues instead. You may want to tweak the
receiveTimeout to have the consumer react faster.
Also you can use non-persistent messages which may also be faster.


>
> Exception that does not stop JMS processing
>
> 2013-01-11 11:37:10,903 [ger[outgoing]-1] WARN
> tQueueMessageListenerContainer - Setup of JMS message listener invoker
> failed for destination 'outgoing' - trying to recover. Cause: The Consumer
> is closed
> 2013-01-11 11:37:10,908 [sumer[incoming]] WARN
> ultJmsMessageListenerContainer - Setup of JMS message listener invoker
> failed for destination 'incoming' - trying to recover. Cause: The Consumer
> is closed
> 2013-01-11 11:37:10,921 [sumer[incoming]] INFO
> ultJmsMessageListenerContainer - Successfully refreshed JMS Connection
> 2013-01-11 11:37:10,922 [ger[outgoing]-1] INFO
> tQueueMessageListenerContainer - Successfully refreshed JMS Connection
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323p5725410.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Jetty to ActiveMQ Failure

Posted by Alan Smithee <h1...@yahoo.com>.
You read my mind :-)


from("jetty:http://localhost:8085/incoming?sessionSupport=true").routeId("Jetty
Endpoint to ActiveMQ")
.setExchangePattern(ExchangePattern.InOut)
.to("activemq:incoming?replyTo=outgoing&replyToType=Exclusive");

I have not been able to reproduce the full "stop the world" exception yet.
But the message below did come up and I was able to continue testing through
it. My concern with using Exclusive queues is that I lose full
clusterability (I kind of need it).


Exception that does not stop JMS processing

2013-01-11 11:37:10,903 [ger[outgoing]-1] WARN 
tQueueMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'outgoing' - trying to recover. Cause: The Consumer
is closed
2013-01-11 11:37:10,908 [sumer[incoming]] WARN 
ultJmsMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'incoming' - trying to recover. Cause: The Consumer
is closed
2013-01-11 11:37:10,921 [sumer[incoming]] INFO 
ultJmsMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-11 11:37:10,922 [ger[outgoing]-1] INFO 
tQueueMessageListenerContainer - Successfully refreshed JMS Connection



--
View this message in context: http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323p5725410.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Jetty to ActiveMQ Failure

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jan 11, 2013 at 4:21 PM, Alan Smithee <h1...@yahoo.com> wrote:
> Thanks for the pointer.
>
> I changed the route to look like this:
>
> from("jetty:http://localhost:8085/incoming?sessionSupport=true").routeId("Jetty
> Endpoint to ActiveMQ")                                                                                  .setExchangePattern(ExchangePattern.InOut)
> .to("jms:incoming");
>
> to match what the documentation suggested. I also upgraded Camel to 2.10.3
> and Jetty to 8.1.2.v20120308 to see if it helps. Unfortunately the bug still
> exists using the same jmsConfig I listed above.
>

Try with fixed/exclusive reply to queues, eg

.to("jms:incoming?replyTo=myReplyQueue&replyToType=Exclusive")



>
>
> Exception
>
> 2013-01-11 10:12:54,272 [er[temporary]-1] WARN
> efaultMessageListenerContainer - Setup of JMS message listener invoker
> failed for destination 'temporary' - trying to recover. Cause: The Consumer
> is closed
> 2013-01-11 10:12:54,275 [er[temporary]-1] INFO  PooledConnection
> - failed to delete Temporary Queue
> "temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1" on closing
> pooled connection: The connection is already closed
> 2013-01-11 10:12:54,279 [sumer[incoming]] WARN
> ultJmsMessageListenerContainer - Setup of JMS message listener invoker
> failed for destination 'incoming' - trying to recover. Cause: The Session is
> closed
> 2013-01-11 10:12:54,291 [sumer[incoming]] INFO
> ultJmsMessageListenerContainer - Successfully refreshed JMS Connection
> 2013-01-11 10:12:54,292 [er[temporary]-1] INFO
> efaultMessageListenerContainer - Successfully refreshed JMS Connection
> 2013-01-11 10:12:54,303 [sumer[incoming]] WARN  EndpointMessageListener
> - Execution of JMS message listener failed. Caused by:
> [org.apache.camel.RuntimeCamelException -
> org.springframework.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1; nested
> exception is javax.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1]
> org.apache.camel.RuntimeCamelException:
> org.springframework.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1; nested
> exception is javax.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1
>         at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1271)
>         at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:125)
>         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.runWorker(ThreadPoolExecutor.java:1110)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:722)
> Caused by: org.springframework.jms.InvalidDestinationException: Cannot
> publish to a deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1; nested
> exception is javax.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1
>         at
> org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:285)
>         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:198)
>         at
> org.apache.camel.component.jms.EndpointMessageListener.sendReply(EndpointMessageListener.java:353)
>         at
> org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:206)
>         at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:108)
>         ... 11 more
> Caused by: javax.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1
>         at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1731)
>         at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:277)
>         at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:212)
>         at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:79)
>         at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:62)
>         at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:592)
>         at
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSend(JmsConfiguration.java:276)
>         at
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:215)
>         at
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:157)
>         at
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$4.doInJms(JmsConfiguration.java:200)
>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
>         ... 15 more
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323p5725401.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Jetty to ActiveMQ Failure

Posted by Alan Smithee <h1...@yahoo.com>.
Thanks for the pointer.

I changed the route to look like this:

from("jetty:http://localhost:8085/incoming?sessionSupport=true").routeId("Jetty
Endpoint to ActiveMQ")											.setExchangePattern(ExchangePattern.InOut)															
.to("jms:incoming");

to match what the documentation suggested. I also upgraded Camel to 2.10.3
and Jetty to 8.1.2.v20120308 to see if it helps. Unfortunately the bug still
exists using the same jmsConfig I listed above.



Exception

2013-01-11 10:12:54,272 [er[temporary]-1] WARN 
efaultMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'temporary' - trying to recover. Cause: The Consumer
is closed
2013-01-11 10:12:54,275 [er[temporary]-1] INFO  PooledConnection              
- failed to delete Temporary Queue
"temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1" on closing
pooled connection: The connection is already closed
2013-01-11 10:12:54,279 [sumer[incoming]] WARN 
ultJmsMessageListenerContainer - Setup of JMS message listener invoker
failed for destination 'incoming' - trying to recover. Cause: The Session is
closed
2013-01-11 10:12:54,291 [sumer[incoming]] INFO 
ultJmsMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-11 10:12:54,292 [er[temporary]-1] INFO 
efaultMessageListenerContainer - Successfully refreshed JMS Connection
2013-01-11 10:12:54,303 [sumer[incoming]] WARN  EndpointMessageListener       
- Execution of JMS message listener failed. Caused by:
[org.apache.camel.RuntimeCamelException -
org.springframework.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1; nested
exception is javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1]
org.apache.camel.RuntimeCamelException:
org.springframework.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1; nested
exception is javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1271)
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:125)
	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.runWorker(ThreadPoolExecutor.java:1110)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.jms.InvalidDestinationException: Cannot
publish to a deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1; nested
exception is javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1
	at
org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:285)
	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:198)
	at
org.apache.camel.component.jms.EndpointMessageListener.sendReply(EndpointMessageListener.java:353)
	at
org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:206)
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:108)
	... 11 more
Caused by: javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination:
temp-queue://ID:Ks-MacBook-Pro.local-52010-1357916734376-3:3:1
	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1731)
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:277)
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:212)
	at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:79)
	at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:62)
	at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:592)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSend(JmsConfiguration.java:276)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:215)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:157)
	at
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$4.doInJms(JmsConfiguration.java:200)
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
	... 15 more



--
View this message in context: http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323p5725401.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Jetty to ActiveMQ Failure

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I think we have recently fixed so when doing request/reply over JMS
with temp queues, Camel will now
refresh and re-create destinations if the connection has failed / been
recreated.

If you use fixed or exclusive queues then this happens already.
See more details at the camel-jms doc page.


On Thu, Jan 10, 2013 at 11:19 PM, Alan Smithee <h1...@yahoo.com> wrote:
> I am seeing the exception listed below after running a fairly straightforward
> load test against jetty/activemq/camel. As best as I can make out, it occurs
> only after I have run the test a few times (i.e.
> start,finish,start,finish,start,exception), at which time all connections in
> the test fail. One variable that seems to make a difference is how I define
> the jms bean in the spring config. For performance reasons, I would really
> like to use the maxConnections and concurrentConsumers values, but this
> exception seems to only happen when I use the config that has those values.
>
> I'd be willing to share the project with interested parties if it's helpful
> (its a fairly simple maven project)
>
> Details below....
>
>
> My Route
>
> from("jetty:http://localhost:8085/incoming?sessionSupport=true").routeId("Jetty
> Endpoint to ActiveMQ")
>                                                                                                                                                 .to("jms:incoming");
>
>                 from("jms:incoming").routeId("ActiveMQ Incoming")
>                                                                         .unmarshal(customGsonParser)
>                                                                         .beanRef("dispatcher", "dispatch")
>                                                                         .marshal(customGsonParser);
>
> My JMS Config That Does Not Produce The Exception
>
> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>                 <property name="connectionFactory">
>                         <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>                                 <property name="brokerURL" value="tcp://localhost:61616" />
>                         </bean>
>                 </property>
>         </bean>
>
> My JMS Config That Produces The Exception
>
> <bean id="jmsConnectionFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
>                 <property name="brokerURL" value="tcp://localhost:61616" />
>         </bean>
>
>         <bean id="pooledConnectionFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory"
>                 init-method="start" destroy-method="stop">
>                 <property name="maxConnections" value="100" />
>                 <property name="connectionFactory" ref="jmsConnectionFactory" />
>         </bean>
>
>         <bean id="jmsConfig"
> class="org.apache.camel.component.jms.JmsConfiguration">
>                 <property name="connectionFactory" ref="pooledConnectionFactory" />
>                 <property name="concurrentConsumers" value="50" />
>         </bean>
>
>    <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>                 <property name="configuration" ref="jmsConfig" />
>         </bean>
>
> System Details
>
> java version : "1.7.0_07"
> MacOS : 10.8.2
> maven-jetty-plugin : 6.1.26
> Jetty : 7.5.4.v20111024
> Camel : 2.10.2
> Apache ActiveMQ : 5.7.0
>
> The Exception:
>
> [INFO] Started Jetty Server
> 2013-01-10 16:53:54,426 [er[temporary]-1] WARN
> efaultMessageListenerContainer - Setup of JMS message listener invoker
> failed for destination 'temporary' - trying to recover. Cause: The Consumer
> is closed
> 2013-01-10 16:53:54,430 [er[temporary]-1] INFO  PooledConnection
> - failed to delete Temporary Queue
> "temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1" on closing
> pooled connection: The connection is already closed
> 2013-01-10 16:53:54,432 [sumer[incoming]] WARN
> ultJmsMessageListenerContainer - Setup of JMS message listener invoker
> failed for destination 'incoming' - trying to recover. Cause: The Consumer
> is closed
> 2013-01-10 16:53:54,447 [sumer[incoming]] INFO
> ultJmsMessageListenerContainer - Successfully refreshed JMS Connection
> 2013-01-10 16:53:54,451 [er[temporary]-1] INFO
> efaultMessageListenerContainer - Successfully refreshed JMS Connection
> 2013-01-10 16:53:54,462 [sumer[incoming]] WARN  EndpointMessageListener
> - Execution of JMS message listener failed. Caused by:
> [org.apache.camel.RuntimeCamelException -
> org.springframework.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1; nested
> exception is javax.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1]
> org.apache.camel.RuntimeCamelException:
> org.springframework.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1; nested
> exception is javax.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1
>         at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1270)
>         at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:125)
>         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.runWorker(ThreadPoolExecutor.java:1110)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:722)
> Caused by: org.springframework.jms.InvalidDestinationException: Cannot
> publish to a deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1; nested
> exception is javax.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1
>         at
> org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:285)
>         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:198)
>         at
> org.apache.camel.component.jms.EndpointMessageListener.sendReply(EndpointMessageListener.java:353)
>         at
> org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:206)
>         at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:108)
>         ... 11 more
> Caused by: javax.jms.InvalidDestinationException: Cannot publish to a
> deleted Destination:
> temp-queue://ID:Ks-MacBook-Pro.local-64733-1357854558059-3:2:1
>         at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1731)
>         at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:277)
>         at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:212)
>         at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:79)
>         at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:62)
>         at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:592)
>         at
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSend(JmsConfiguration.java:276)
>         at
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:215)
>         at
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:157)
>         at
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$4.doInJms(JmsConfiguration.java:200)
>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
>         ... 15 more
> 2013-01-10 16:54:15,428 [ecker[incoming]] WARN  TemporaryQueueReplyManager
> - Timeout occurred after 20000 millis waiting for reply message with
> correlationID [ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450553].
> Setting ExchangeTimedOutException on (MessageId:
> ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450550 on ExchangeId:
> ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450549) and continue routing.
> 2013-01-10 16:54:15,431 [ecker[incoming]] ERROR DefaultErrorHandler
> - Failed delivery for (MessageId:
> ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450550 on ExchangeId:
> ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450549). Exhausted after
> delivery attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The
> OUT message was not received within: 20000 millis due reply message with
> correlationID: ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450553 not
> received. Exchange[Message: [Body is instance of
> org.apache.camel.StreamCache]]
> org.apache.camel.ExchangeTimedOutException: The OUT message was not received
> within: 20000 millis due reply message with correlationID:
> ID-Ks-MacBook-Pro-local-64734-1357854558361-0-450553 not received.
> Exchange[Message: [Body is instance of org.apache.camel.StreamCache]]
>         at
> org.apache.camel.component.jms.reply.ReplyManagerSupport.processReply(ReplyManagerSupport.java:133)
>         at
> org.apache.camel.component.jms.reply.TemporaryQueueReplyHandler.onTimeout(TemporaryQueueReplyHandler.java:61)
>         at
> org.apache.camel.component.jms.reply.CorrelationTimeoutMap.onEviction(CorrelationTimeoutMap.java:53)
>         at
> org.apache.camel.component.jms.reply.CorrelationTimeoutMap.onEviction(CorrelationTimeoutMap.java:30)
>         at
> org.apache.camel.support.DefaultTimeoutMap.purge(DefaultTimeoutMap.java:203)
>         at
> org.apache.camel.support.DefaultTimeoutMap.run(DefaultTimeoutMap.java:159)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
>         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
>         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:722)
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Jetty-to-ActiveMQ-Failure-tp5725323.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen