camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel JMS Component (ActiveMQ) Repeatedly Reconnects
Date Tue, 17 Mar 2009 04:54:00 GMT
Hi

You should use the ActiveMQ component instead of the generic
JmsComponent. Its optimized for AMQ.
http://camel.apache.org/activemq.html



On Mon, Mar 16, 2009 at 9:37 PM, greenbean <Kevin.Urciolo@ngc.com> wrote:
>
> Apache Camel 2.0 Snapshot
> Apache ActiveMQ 5.2
>
> When I started Apache Camel I see repeated connect/disconnect events in
> activemq.  Is there something I have done incorrectly to have activemq do
> this?  I use ActiveMQ other places (outside of camel) and everything works
> fine.
>
> Below is the XML configuration and the DEBUG log information from ActiveMQ.
> ---------------------------------------------------------------------------------
> <camel:camelContext id="camel">
>                <camel:route>
>                        <camel:from uri="activemq:queue:testa" />
>                        <camel:policy ref="PROPAGATION_REQUIRED" />
>                        <camel:process ref="myProcessor" />
>                        <camel:to uri="activemq:queue:testb" />
>                </camel:route>
>        </camel:camelContext>
>        <bean id="myProcessor"
> class="com.ngc.ident1.example.camel.CamelProcessor">
>        </bean>
>        <bean id="activemq"
> class="org.apache.camel.component.jms.JmsComponent">
>                <property name="connectionFactory">
>                        <bean
> class="org.apache.activemq.ActiveMQXAConnectionFactory">
>                                <property name="brokerURL">
>                                        <value>${local.broker.url}</value>
>                                </property>
>                        </bean>
>                </property>
>                <property name="cacheLevelName" value="CACHE_NONE" />
>                <property name="transacted" value="true" />
>                <property name="transactionManager" ref="transactionManager"
> />
>        </bean>
>        <bean id="PROPAGATION_REQUIRED"
> class="org.apache.camel.spring.spi.SpringTransactionPolicy">
>                <constructor-arg>
>                        <bean
> class="org.springframework.transaction.support.TransactionTemplate">
>                                <property name="transactionManager"
> ref="transactionManager" />
>                        </bean>
>                </constructor-arg>
>        </bean>
> ---------------------------------------------------------------------------------
>
> 2009-03-16 20:34:08,482 DEBUG
> [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Task)
> Sending: WireFormatInfo { version=3, properties={CacheSize=1024,
> CacheEnabled=true, SizePrefixDisabled=false,
> MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true,
> MaxInactivityDuration=30000, TightEncodingEnabled=true,
> StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2009-03-16 20:34:08,485 DEBUG
> [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport
> Initiator: /127.0.0.1:59998) Sending: WireFormatInfo { version=3,
> properties={CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false,
> MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true,
> MaxInactivityDuration=30000, TightEncodingEnabled=true,
> StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2009-03-16 20:34:08,485 DEBUG
> [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
> tcp:///127.0.0.1:59998) Received WireFormat: WireFormatInfo { version=3,
> properties={CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false,
> MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true,
> MaxInactivityDuration=30000, TightEncodingEnabled=true,
> StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2009-03-16 20:34:08,485 DEBUG
> [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
> tcp:///127.0.0.1:59998) tcp:///127.0.0.1:59998 before negotiation:
> OpenWireFormat{version=3, cacheEnabled=false, stackTraceEnabled=false,
> tightEncodingEnabled=false, sizePrefixDisabled=false}
> 2009-03-16 20:34:08,485 DEBUG
> [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
> tcp:///127.0.0.1:59998) tcp:///127.0.0.1:59998 after negotiation:
> OpenWireFormat{version=3, cacheEnabled=true, stackTraceEnabled=true,
> tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2009-03-16 20:34:08,486 DEBUG
> [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
> tcp://localhost/127.0.0.1:61616) Received WireFormat: WireFormatInfo {
> version=3, properties={CacheSize=1024, CacheEnabled=true,
> SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000,
> TcpNoDelayEnabled=true, MaxInactivityDuration=30000,
> TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2009-03-16 20:34:08,486 DEBUG
> [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
> tcp://localhost/127.0.0.1:61616) tcp://localhost/127.0.0.1:61616 before
> negotiation: OpenWireFormat{version=3, cacheEnabled=false,
> stackTraceEnabled=false, tightEncodingEnabled=false,
> sizePrefixDisabled=false}
> 2009-03-16 20:34:08,486 DEBUG
> [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
> tcp://localhost/127.0.0.1:61616) tcp://localhost/127.0.0.1:61616 after
> negotiation: OpenWireFormat{version=3, cacheEnabled=true,
> stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2009-03-16 20:34:08,486 DEBUG
> [org.apache.activemq.broker.TransportConnection] (ActiveMQ Transport:
> tcp:///127.0.0.1:59998) Setting up new connection: /127.0.0.1:59998
> 2009-03-16 20:34:08,488 DEBUG
> [org.apache.activemq.broker.region.AbstractRegion] (ActiveMQ Transport:
> tcp:///127.0.0.1:59998) Adding consumer:
> ID:csnwas16-58202-1237234459278-3:1172:-1:1
> 2009-03-16 20:34:08,493 DEBUG
> [org.apache.activemq.broker.region.AbstractRegion] (ActiveMQ Transport:
> tcp:///127.0.0.1:59998) Adding consumer:
> ID:csnwas16-58202-1237234459278-3:1172:1:1
> 2009-03-16 20:34:09,500 DEBUG
> [org.apache.activemq.broker.region.AbstractRegion] (ActiveMQ Transport:
> tcp:///127.0.0.1:59998) Removing consumer:
> ID:csnwas16-58202-1237234459278-3:1172:1:1
> 2009-03-16 20:34:09,500 DEBUG
> [org.apache.activemq.store.amq.AMQMessageStore] (ActiveMQ Transport:
> tcp:///127.0.0.1:59998) flush starting ...
> 2009-03-16 20:34:09,540 DEBUG
> [org.apache.activemq.broker.region.AbstractRegion] (ActiveMQ Transport:
> tcp:///127.0.0.1:59998) Removing consumer:
> ID:csnwas16-58202-1237234459278-3:1172:-1:1
> 2009-03-16 20:34:09,540 DEBUG
> [org.apache.activemq.transport.tcp.TcpTransport]
> (DefaultMessageListenerContainer-1072) Stopping transport
> tcp://localhost/127.0.0.1:61616
> 2009-03-16 20:34:09,541 INFO
> [com.ngc.ident1.activemq.transport.orderedfailover.OrderedFailoverTransport]
> (ActiveMQ Transport: tcp://localhost/127.0.0.1:61616) Transport failed,
> attempting to automatically reconnect due to: java.net.SocketException:
> Socket closed
> java.net.SocketException: Socket closed
>        at java.net.SocketInputStream.socketRead0(Native Method)
>        at java.net.SocketInputStream.read(SocketInputStream.java:129)
>        at
> org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
>        at
> org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
>        at java.io.DataInputStream.readInt(DataInputStream.java:370)
>        at
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:210)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:202)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
>        at java.lang.Thread.run(Thread.java:619)
> 2009-03-16 20:34:09,542 DEBUG
> [org.apache.activemq.broker.TransportConnection] (ActiveMQ Transport
> Stopper: /127.0.0.1:59998) Stopping connection: /127.0.0.1:59998
> 2009-03-16 20:34:09,542 DEBUG
> [org.apache.activemq.transport.tcp.TcpTransport] (ActiveMQ Transport
> Stopper: /127.0.0.1:59998) Stopping transport tcp:///127.0.0.1:59998
> 2009-03-16 20:34:09,542 DEBUG
> [org.apache.activemq.broker.TransportConnection] (ActiveMQ Transport
> Stopper: /127.0.0.1:59998) Stopped transport: /127.0.0.1:59998
> 2009-03-16 20:34:09,542 DEBUG
> [org.apache.activemq.broker.TransportConnection] (ActiveMQ Transport
> Stopper: /127.0.0.1:59998) Connection Stopped: /127.0.0.1:59998
>
>
>
> --
> View this message in context: http://www.nabble.com/Camel-JMS-Component-%28ActiveMQ%29-Repeatedly-Reconnects-tp22546705p22546705.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Mime
View raw message