I have a problem with this failover parameter:
I can't stop the process now. I guess since it stays alive with attempts to
reconnect to the AMQ.
Any ideas of how i can shut it down?
Thanks, Michal



Michal Singer wrote:
> 
> Great, it helped.
> thanks.
> 
> 
> Dejan Bosanac wrote:
>> 
>> Hi,
>> 
>> if you put just one broker URL inside the failover transport URI, like
>> 
>> failover:(tcp://localhost:61616)
>> 
>> the client will try to reconnect to that broker in case that connection
>> dies.
>> 
>> Regards
>> --
>> Dejan Bosanac
>> 
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>> 
>> 
>> On Mon, Feb 2, 2009 at 11:14 AM, Michal Singer
>> <michal.sin...@expand.com>wrote:
>> 
>>>
>>> Hi, the failover transport lets you load balance clients over a number
>>> of
>>> brokers.
>>> However, i have one broker and i don't need any more brokers.
>>> I want the client to be able to reconnect to the same broker once it is
>>> up
>>> again.
>>> How can i do that?
>>>
>>> Thanks, Michal
>>>
>>>
>>>
>>> Dejan Bosanac wrote:
>>> >
>>> > Hi,
>>> >
>>> > take a look at failover transport
>>> >
>>> > http://activemq.apache.org/failover-transport-reference.html
>>> >
>>> > you should use this transport on the client side to enable successful
>>> > reconnection.
>>> >
>>> > Cheers
>>> > --
>>> > Dejan Bosanac
>>> >
>>> > Open Source Integration - http://fusesource.com/
>>> > ActiveMQ in Action - http://www.manning.com/snyder/
>>> > Blog - http://www.nighttale.net
>>> >
>>> >
>>> > On Sun, Feb 1, 2009 at 9:04 AM, Michal Singer
>>> > <michal.sin...@expand.com>wrote:
>>> >
>>> >>
>>> >> Hi.
>>> >> I am trying to simulate a scenario where the process raising the
>>> broker
>>> >> crashed and was raised again.
>>> >> I get a lot of EOF exceptions. what configuration is needed so that
>>> the
>>> >> client will succeed to reconnect to the queues after broker was
>>> >> restarted?
>>> >>
>>> >> This is the exception i get:
>>> >> javax.jms.JMSException: java.io.EOFException
>>> >> at
>>> >>
>>> >>
>>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
>>> >> at
>>> >>
>>> >>
>>> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1252)
>>> >> at
>>> org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1659)
>>> >> at
>>> >>
>>> >>
>>> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:227)
>>> >> at
>>> >>
>>> >>
>>> org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:300)
>>> >> at
>>> >>
>>> >>
>>> com.expand.expandview.infrastructure.task_executor.ClientExecuterController.sendMessage(ClientExecuterController.java:383)
>>> >> at
>>> >>
>>> >>
>>> com.expand.expandview.infrastructure.task_executor.ClientExecuterController.operate(ClientExecuterController.java:336)
>>> >> at
>>> >>
>>> >>
>>> com.expand.expandview.infrastructure.proxies.AbstractAsyncProxy.operate(AbstractAsyncProxy.java:88)
>>> >> at
>>> >>
>>> >>
>>> com.expand.expandview.infrastructure.proxies.ClientProxy.operate(ClientProxy.java:43)
>>> >> at
>>> >>
>>> >>
>>> com.expand.expandview.client.services.LogicServices.operateOnNoWait(LogicServices.java:106)
>>> >> at
>>> >>
>>> >>
>>> com.expand.expandview.client.services.ClientAgentLogicServices.operate(ClientAgentLogicServices.java:36)
>>> >> at
>>> >>
>>> >>
>>> com.expand.expandview.client.services.AgentServices.operateMsg(AgentServices.java:53)
>>> >> at
>>> >>
>>> >>
>>> com.expand.expandview.client.servlets.agent.AgentServlet.doPost(AgentServlet.java:112)
>>> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>>> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>> >> at
>>> >>
>>> >>
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>> >> at
>>> >>
>>> >>
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>> >> at
>>> >>
>>> >>
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>> >> at
>>> >>
>>> >>
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>> >> at
>>> >>
>>> >>
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>>> >> at
>>> >>
>>> >>
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>> >> at
>>> >>
>>> >>
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>> >> at
>>> >>
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>>> >> at
>>> >>
>>> >>
>>> org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:880)
>>> >> at
>>> >>
>>> >>
>>> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
>>> >> at
>>> >>
>>> >>
>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2081)
>>> >> at
>>> >>
>>> >>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>> >> at
>>> >>
>>> >>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>> >> at java.lang.Thread.run(Thread.java:595)
>>> >> Caused by: 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:209)
>>> >> at
>>> >>
>>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:201)
>>> >> at
>>> >>
>>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:184)
>>> >> ... 1 more
>>> >>
>>> >>
>>> >> This is the activemq configuraiton i use:
>>> >> xml version="1.0" encoding="UTF-8"?>
>>> >> <beans
>>> xsi:schemaLocation="http://www.springframework.org/schema/beans
>>> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>>> >> http://activemq.org/config/1.0
>>> >> http://activemq.apache.org/schema/activemq-core.xsd
>>> >> http://activemq.apache.org/camel/schema/spring
>>> >> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd";
>>> >> xmlns:amq="http://activemq.org/config/1.0";
>>> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>> >> xmlns="http://www.springframework.org/schema/beans";>
>>> >> <bean
>>> >>
>>> >>
>>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>>> >> <broker brokerName="embeddedbroker" useJmx="true" persistent="true"
>>> >> dataDirectory="..\..\work\activemq-data"
>>> >> xmlns="http://activemq.org/config/1.0";>
>>> >> <transportConnectors>
>>> >> <transportConnector name="tcp"
>>> >>
>>> >>
>>> uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=0&amp;soTimeout=60000&amp;connectionTimeout=60000"/>
>>> >> </transportConnectors>
>>> >> <networkConnectors>
>>> >> <networkConnector name="default-nc" uri="multicast://default"/>
>>> >> </networkConnectors>
>>> >> <managementContext>
>>> >> <managementContext connectorPort="1099"
>>> >> jmxDomainName="org.apache.activemq"/>
>>> >> </managementContext>
>>> >> <systemUsage>
>>> >> <systemUsage>
>>> >> <memoryUsage>
>>> >> <memoryUsage limit="10 mb" percentUsageMinDelta="20"/>
>>> >> </memoryUsage>
>>> >> <tempUsage>
>>> >> <tempUsage limit="100 mb"/>
>>> >> </tempUsage>
>>> >> </systemUsage>
>>> >> </systemUsage>
>>> >> </broker>
>>> >> </beans>
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/Fail-to-reconnect-to-AMQ-queues-after-restarting-the-broker-tp21772575p21772575.html
>>> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >
>>> >
>>> > -----
>>> > Dejan Bosanac
>>> >
>>> > Open Source Integration - http://fusesource.com/
>>> > ActiveMQ in Action - http://www.manning.com/snyder/
>>> > Blog - http://www.nighttale.net
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Fail-to-reconnect-to-AMQ-queues-after-restarting-the-broker-tp21772575p21787142.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> -----
>> Dejan Bosanac
>> 
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Fail-to-reconnect-to-AMQ-queues-after-restarting-the-broker-tp21772575p22020405.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to