Hi
I have a topics looked up on remote activemq broker. During some hours in
the day some of the topics do not receive messages, so the connection to
those topics timed out. The topics that receives messages all the time does
not have this issue. On every onException i reset all connections and re
subscribe to the topic. My thoughts are if i don't reconnect, will the
connection be activated again when the topic on activemq broker begin to
receive messages? Or how to handle such timed outs?

2010-05-11 06:56:21,131 INFO  [MyActiveMQClientManager] (ActiveMQ Connection
Worker: tcp://datastream/IP:61616) Looking up topic connection factory
[ConnectionFactory]...
2010-05-11 06:56:21,134 ERROR [MyActiveMQConsumer] (ActiveMQ Connection
Worker: tcp://HOST/IP:61616) MyActiveMQConsumer::onException
javax.jms.JMSException: Connection timed out
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
        at
org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1803)
        at
org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1820)
        at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99)
        at
org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:126)
        at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99)
        at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99)
        at
org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:160)
        at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:254)
        at
org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:190)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Connection timed out
        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.TcpTransport$2.fill(TcpTransport.java:527)
        at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
        at
org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:512)
        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:211)
        at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:186)
        ... 1 more
2010-05-11 06:56:21,145 INFO  [MyActiveMQClientManager] (ActiveMQ Connection
Worker: tcp://HOST/IP:61616) JNDI
Context[{java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory,
java.naming.provider.url=tcp://HOST:61616?keepAlive=true&wireFormat.maxInactivityDuration=0,
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces}]...


-- 
View this message in context: 
http://old.nabble.com/Connection-timed-out---is-there-a-need-to-reconnect-the-client-tp28520856p28520856.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to