You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by huntc <hu...@mac.com> on 2008/11/07 12:49:26 UTC

Camel ActiveMQ service not recovering from lost broker

Hi there,

I've just noticed that if I shut down the ActiveMQ broker and then start it
up again, all while my activemq endpoint based service is listening on its
queue, my service does not pick the queue back up when ActiveMQ is back
up...

My endpoint URL: 


activemq:queue:au.com.blueglue.ohs.reed.persistPerson?concurrentConsumers=2


The broker is declared as:


&lt;bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent"&gt;
	&lt;property name="brokerURL" value="tcp://localhost:61616" /&gt;
&lt;/bean&gt;


I'm using Camel 1.5.0 but I've also tried the above scenario using 1.4.0.
I'm also using ActiveMQ 5.1.0.

What am I doing wrong?

Kind regards,
Christopher
-- 
View this message in context: http://www.nabble.com/Camel-ActiveMQ-service-not-recovering-from-lost-broker-tp20379163s22882p20379163.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel ActiveMQ service not recovering from lost broker

Posted by huntc <hu...@mac.com>.
I have now been able to demonstrate the problem using the
camel-example-jms-file project. I have subsequently generated an issue in
JIRA explaining the steps required to reproduce the condition:

https://issues.apache.org/activemq/browse/CAMEL-1064

Kind regards,
Christopher
-- 
View this message in context: http://www.nabble.com/Camel-ActiveMQ-service-not-recovering-from-lost-broker-tp20379163s22882p20395208.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel ActiveMQ service not recovering from lost broker

Posted by huntc <hu...@mac.com>.
Some more information...

If I turn on debug logging for everything then I see the following messages
produced periodically:


2008-11-08 16:49:52,677 [nerContainer-12] DEBUG
efaultMessageListenerContainer - Consumer [ActiveMQMessageConsumer {
value=ID:christopher-hunts-macbook-air.local-52492-1226123386415-0:0:2:1,
started=true }] of session [PooledSession { ActiveMQSession
{id=ID:christopher-hunts-macbook-air.local-52492-1226123386415-0:0:2,started=true}
}] did not receive a message
2008-11-08 16:49:53,679 [nerContainer-14] DEBUG
efaultMessageListenerContainer - Consumer [ActiveMQMessageConsumer {
value=ID:christopher-hunts-macbook-air.local-52492-1226123386415-0:0:2:1,
started=true }] of session [PooledSession { ActiveMQSession
{id=ID:christopher-hunts-macbook-air.local-52492-1226123386415-0:0:2,started=true}
}] did not receive a message
2008-11-08 16:49:53,680 [nerContainer-13] DEBUG
efaultMessageListenerContainer - Consumer [ActiveMQMessageConsumer {
value=ID:christopher-hunts-macbook-air.local-52492-1226123386415-0:0:1:1,
started=true }] of session [PooledSession { ActiveMQSession
{id=ID:christopher-hunts-macbook-air.local-52492-1226123386415-0:0:1,started=true}
}] did not receive a message


I presume that these are heartbeat style messages.

If I then stop the external broker:


2008-11-08 16:49:54,558 [127.0.0.1:61616] DEBUG ActiveMQConnection            
- Async exception with no exception listener: java.io.EOFException
java.io.EOFException
	at java.io.DataInputStream.readInt(DataInputStream.java:358)
	at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269)
	at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:203)
	at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:195)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
	at java.lang.Thread.run(Thread.java:613)
2008-11-08 16:49:54,562 [127.0.0.1:61616] DEBUG TcpTransport                  
- Stopping transport tcp://localhost/127.0.0.1:61616


...happens almost immediately.

If I then restart the broker, wait a few seconds after it is fully up, then
stop the broker again, I do not see the above stacktrace.

Any assistance is greatly appreciated as having a situation whereby my Camel
service cannot recover from an external broker not being available is a bit
of an issue for me.

Kind regards,
Christopher
-- 
View this message in context: http://www.nabble.com/Camel-ActiveMQ-service-not-recovering-from-lost-broker-tp20379163s22882p20393298.html
Sent from the Camel - Users mailing list archive at Nabble.com.