activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vadimos <vadim_k...@yahoo.com>
Subject Re: sends/receives block during failover
Date Thu, 11 Sep 2008 17:28:40 GMT

AMQ-1934 is created.

It does look like the behavior I am observing is different from other issues
reported. Please let me know if I can provide any further information. I am
looking forward to your findings.

regards,
vadim


Mario Siegenthaler-2 wrote:
> 
> Hi Vadim
> The "sender will block until resumed" means that if your broker dies
> (or when your broker is down) while your application calls send (or
> commit) then that call will just wait until your broker is back up or
> the slave broker has taken over. This is normally desired behavior.
> However it can lead to applications waiting forever, so to deal with
> that you can set timeouts or add the TransportListener.
> I see you're using AMQ-5.1.0 and transacted sessions. I've had
> problems with that (AMQ-1710 and AMQ-1925), it does not work
> consistently with this version. The consumer will mostly throw an
> exception (as seen im AMQ-1710). However your behavior seems a but
> different, can you create a jira-issue and attach your test-case? I'd
> like to try in on my patched version and see what happens.
> 
> --Mario
> 
> On Wed, Sep 10, 2008 at 11:51 PM, vadimos <vadim_katz@yahoo.com> wrote:
>>
>> Below is the output from a unit test I wrote to demonstrate the problem.
>> here is the summary from what is highlighted:
>> 14:34:28 - send "Hello, World!"
>> 14:34:29 - receive "Hello, World!"
>> 14:34:34 - remind myself to shutdown master broker, i.e. localhost:61626
>> 14:34:40 - amq detects transport failure on master
>> 14:34:51 - amq reconnects to slave, i.e. localhost:61616. Also 2
>> onCommand()
>> invocations
>> 14:35:04 - send "Hello, World!"
>> 14:35:34 - shutdown because I gave up on waiting to receive.
>>
>> What is going on after 14:34:51? no continuous onCommand() invocations
>> nor
>> ability to receive the second message!
>>
>> thanks,
>> vadim
>>
>>
>> 14:34:27 INFO  org.springframework.test.context.TestContextManager
>> @TestExecutionListeners is not present for class [class
>> vadim.sample.jms.activemq.JobSenderTest]: using defaults.
>> 14:34:27 INFO 
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>> Loading XML bean definitions from class path resource
>> [applicationContext.xml]
>> 14:34:27 INFO 
>> org.springframework.context.support.GenericApplicationContext
>> Refreshing
>> org.springframework.context.support.GenericApplicationContext@117a8bd:
>> display name
>> [org.springframework.context.support.GenericApplicationContext@117a8bd];
>> startup date [Wed Sep 10 14:34:27 PDT 2008]; root of context hierarchy
>> 14:34:27 INFO 
>> org.springframework.context.support.GenericApplicationContext
>> Bean factory for application context
>> [org.springframework.context.support.GenericApplicationContext@117a8bd]:
>> org.springframework.beans.factory.support.DefaultListableBeanFactory@a9c09e
>> 14:34:27 INFO
>> org.springframework.beans.factory.support.DefaultListableBeanFactory
>> Pre-instantiating singletons in
>> org.springframework.beans.factory.support.DefaultListableBeanFactory@a9c09e:
>> defining beans
>> [jmsExceptionListener,jmsPrefetchPolicy,jmsRedeliveryPolicy,activeMQConnectionFactory,activeMQPooledConnectionFactory,jmsTemplate,destination,listenerContainer,messageListener,jobReceiver,jobSender,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor];
>> root of factory hierarchy
>> 14:34:28 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> transportResumed is called
>> 14:34:28 INFO  org.apache.activemq.transport.failover.FailoverTransport
>> Successfully connected to tcp://localhost:61626
>> 14:34:28 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:28 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:28 INFO  vadim.sample.jms.activemq.JobSender Sending message:
>> Hello,
>> World!
>> 14:34:28 INFO  org.springframework.jms.connection.SingleConnectionFactory
>> Established shared JMS Connection: PooledConnection {
>> org.apache.activemq.pool.ConnectionPool@b60b93 }
>> 14:34:28 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:28 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> transportResumed is called
>> 14:34:28 INFO  org.apache.activemq.transport.failover.FailoverTransport
>> Successfully connected to tcp://localhost:61626
>> 14:34:28 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:29 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:29 INFO  vadim.sample.jms.activemq.JobReceiver Received message:
>> Hello, World!
>> 14:34:30 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:31 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:32 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:33 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:34 INFO  vadim.sample.jms.activemq.JobSenderTest Shutdown master
>> broker!!!
>> 14:34:34 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:35 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:36 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:37 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:38 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:39 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:40 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:40 WARN  org.apache.activemq.transport.failover.FailoverTransport
>> Transport failed to tcp://localhost:61626 , attempting to automatically
>> reconnect due to: java.io.EOFException
>> 14:34:40 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> transportInterupted is called
>> 14:34:41 WARN  org.apache.activemq.transport.failover.FailoverTransport
>> Transport failed to tcp://localhost:61626 , attempting to automatically
>> reconnect due to: java.io.EOFException
>> 14:34:41 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> transportInterupted is called
>> 14:34:51 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:51 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> transportResumed is called
>> 14:34:51 INFO  org.apache.activemq.transport.failover.FailoverTransport
>> Successfully reconnected to tcp://localhost:61616
>> 14:34:51 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:51 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> transportResumed is called
>> 14:34:51 INFO  org.apache.activemq.transport.failover.FailoverTransport
>> Successfully reconnected to tcp://localhost:61616
>> 14:34:51 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:34:51 INFO  vadim.sample.jms.activemq.ActiveMQTransportListener
>> onCommand
>> is called
>> 14:35:04 INFO  vadim.sample.jms.activemq.JobSender Sending message:
>> Hello,
>> World!
>> 14:35:34 INFO 
>> org.springframework.context.support.GenericApplicationContext
>> Closing
>> org.springframework.context.support.GenericApplicationContext@117a8bd:
>> display name
>> [org.springframework.context.support.GenericApplicationContext@117a8bd];
>> startup date [Wed Sep 10 14:34:27 PDT 2008]; root of context hierarchy
>> 14:35:34 INFO
>> org.springframework.beans.factory.support.DefaultListableBeanFactory
>> Destroying singletons in
>> org.springframework.beans.factory.support.DefaultListableBeanFactory@a9c09e:
>> defining beans
>> [jmsExceptionListener,jmsPrefetchPolicy,jmsRedeliveryPolicy,activeMQConnectionFactory,activeMQPooledConnectionFactory,jmsTemplate,destination,listenerContainer,messageListener,jobReceiver,jobSender,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor];
>> root of factory hierarchy
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/sends-receives-block-during-failover-tp19415060p19423862.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/sends-receives-block-during-failover-tp19415060p19440141.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message