camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shlomi java <shlomij...@gmail.com>
Subject Camel crashes upon ActiveMQ shutdown
Date Sun, 04 Mar 2012 07:34:03 GMT
hi all,

I have a simple* [from:activemq:queue:queueName - to:log]* route, in Camel
2.9.0 context, with ActiveMQ 5.5.1.

*When ActiveMQ gets shutdown (like on restart), the entire Camel
application is shut down also.*
*I would like the Camel application to be kept alive, waiting for an
available broker service. *(Is it not a reasonable wish?)

I'm using failover on top of a single TCP transport, with
maxReconnectAttempts=-1 and initialReconnectDelay=10000 (these properties
goes on the failover, not on the tcp transport), to get my ActiveMQ
Connection Factory, with a PooledConnectionFactory on top of that.
The Camel context runs with org.apache.camel.spring.Main.

I tried adding my own TransportListener on the ActiveMQConnectionFactory,
but could not come with an insight.

*Configuration:*
<bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL"
value="failover:(tcp://localhost:61616)?maxReconnectAttempts=-1&initialReconnectDelay=10000"
/>
    <property name="transportListener">
        <bean class="controller.MyTransportListener" />
    </property>
</bean>

*Log:*
2012-03-01 15:04:26.068 DEBUG tcp.TcpTransport - Stopping transport
tcp://localhost/127.0.0.1:61616
2012-03-01 15:04:26.072 WARN  failover.FailoverTransport - Transport
(localhost/127.0.0.1:61616) failed to tcp://localhost:61616 , attempting to
automatically reconnect due to: java.io.EOFException
2012-03-01 15:04:26.081 DEBUG failover.FailoverTransport - Transport failed
with the following exception:
java.io.EOFException
at java.io.DataInputStream.readInt(Unknown Source)
at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269)
at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:227)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:219)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:202)
at java.lang.Thread.run(Unknown Source)
2012-03-01 15:04:26.087 DEBUG activemq.ActiveMQConnection - transport
interrupted, dispatchers: 20
2012-03-01 15:04:26.087 DEBUG activemq.ActiveMQConnection - notified
failover transport (unconnected) of pending interruption processing for:
ID:-13681-1330606750154-0:1
2012-03-01 15:04:26.088 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:10:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.089 ERROR controller.MyTransportListener - Interupted
2012-03-01 15:04:26.089 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:5:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.089 DEBUG failover.FailoverTransport - urlList
connectionList:[tcp://localhost:61616], from: [tcp://localhost:61616]
2012-03-01 15:04:26.089 DEBUG failover.FailoverTransport - Attempting
connect to: tcp://localhost:61616
2012-03-01 15:04:26.089 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:8:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:20:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:12:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:4:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:3:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:18:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:9:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:7:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:11:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:15:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:14:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:16:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.090 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:1:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.091 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:17:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.091 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:13:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.091 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:2:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.091 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:6:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.091 DEBUG activemq.ActiveMQMessageConsumer -
ID:-13681-1330606750154-0:1:19:1 clearing dispatched list (0) on transport
interrupt
2012-03-01 15:04:26.091 DEBUG activemq.ActiveMQConnection -
transportInterruptionProcessingComplete for: ID:-13681-1330606750154-0:1


10x for any input.
ShlomiJ

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message