You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by activemqnewbie <ac...@yahoo.co.in> on 2008/02/11 22:01:06 UTC
Subscriber hangs when broker shutsdown
All,
After i shutdown my broker,i see my subscriber doen't shutsdown but hangs
and doen't consumes any messages when i restart broker and publish message.
I have to manually shutdown and restart the subscriber to consume messages..
I get below exception
<ERROR><2008/02/11 15:42:14.893><18587569><>
org.apache.activemq.ConnectionFailedException: The JMS connection has
failed: java.io.EOFException
at
org.apache.activemq.ActiveMQConnection.checkClosedOrFailed(ActiveMQConnection.java:1233)
at
org.apache.activemq.ActiveMQConnection.stop(ActiveMQConnection.java:494)
at
org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:551)
---
--
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:358)
at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:268)
at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:192)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
at java.lang.Thread.run(Thread.java:595)
<ERROR><2008/02/11 15:42:14.943><18587569><> IntgInputStarter.main -
Exception:
Error Code: -1
k12.util.SystemException: Unable to connect to the JMS Server
Appreciate if somecould help me onthis.
Thanks
Vij
--
View this message in context: http://www.nabble.com/Subscriber-hangs-when-broker-shutsdown-tp15420516s2354p15420516.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Subscriber hangs when broker shutsdown
Posted by ttmdev <jo...@ttmsolutions.com>.
You may want to try using the 'failover' transport. With the example below,
if the broker fails the transport will begin retrying the connection to the
broker. You may want to use a different maxReconnectDelay.
failover://(tcp://localhost:61616)?maxReconnectDelay=1000
Joe
www.ttmsolutions.com
activemqnewbie wrote:
>
> All,
> After i shutdown my broker,i see my subscriber doen't shutsdown but hangs
> and doen't consumes any messages when i restart broker and publish
> message.
> I have to manually shutdown and restart the subscriber to consume
> messages..
>
> I get below exception
> <ERROR><2008/02/11 15:42:14.893><18587569><>
> org.apache.activemq.ConnectionFailedException: The JMS connection has
> failed: java.io.EOFException
>
> at
> org.apache.activemq.ActiveMQConnection.checkClosedOrFailed(ActiveMQConnection.java:1233)
>
> at
> org.apache.activemq.ActiveMQConnection.stop(ActiveMQConnection.java:494)
>
> at
> org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:551)
>
> ---
> --
> Caused by: java.io.EOFException
>
> at java.io.DataInputStream.readInt(DataInputStream.java:358)
>
> at
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:268)
>
> at
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:192)
>
> at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
>
> at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>
> at java.lang.Thread.run(Thread.java:595)
>
>
>
>
> <ERROR><2008/02/11 15:42:14.943><18587569><> IntgInputStarter.main -
> Exception:
>
> Error Code: -1
>
> k12.util.SystemException: Unable to connect to the JMS Server
>
>
>
> Appreciate if somecould help me onthis.
>
> Thanks
> Vij
>
>
>
>
>
>
--
View this message in context: http://www.nabble.com/Subscriber-hangs-when-broker-shutsdown-tp15420516s2354p15433652.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.