Nilantha wrote: > > I did the change as suggested(had to replace '&' with ';') > > <property name="serverUrl" > > value="failover:(tcp://xxx:61416,tcp://xxx:61417)?jms.redeliveryPolicy.allPrefetchValues=1;jms.redeliveryPolicy.initialRedeliveryDelay=2000;jms.redeliveryPolicy.maximumRedeliveries=4;jms.redeliveryPolicy.useCollisionAvoidance=true;" > /> > > now I am getting following NPE from ConnectionStateTracker as soon as an > exception is thrown. > > java.lang.RuntimeException: manually thrown exception: id15 > at net.xxx.xxx.jms.TestBean.onMessage(TestBean.java:34) > at > org.jencks.LocalTransactionEndpoint.onMessage(LocalTransactionEndpoint.java:68) > at > org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:121) > at > org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61) > at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:695) > at > org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165) > at > org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:290) > at > org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32) > at > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) > at > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) > at java.lang.Thread.run(Thread.java:595) > Exception in thread "ActiveMQ Transport: tcp:///XXXX:61416" > java.lang.NullPointerException > at > org.apache.activemq.state.ConnectionStateTracker$RemoveTransactionAction.run(ConnectionStateTracker.java:77) > at org.apache.activemq.state.Tracked.onResponses(Tracked.java:32) > at > org.apache.activemq.transport.failover.FailoverTransport$1.onCommand(FailoverTransport.java:96) > at > org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:133) > at > org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122) > at > org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84) > at > org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:137) > at java.lang.Thread.run(Thread.java:595) > > consumer working fine when no manual exception case...any idea what I > went wrong here? > > -Nilantha >
Christopher G. Stach II wrote: > > Nilantha wrote: >> I have posted this message earlier but it seems lost... sorry if I make >> duplicates. >> >> I am using Jencks(2.0) for inbound. I am throwing a Runtime exception in >> order to test max redelivery setting (I couldn't find any better way to >> test >> with MDPs). If there are no exceptions thrown from MDP messages are >> consumed >> continuously. But as soon as an exception is thrown MDP no longer >> receives >> messages. Only way to get those consumed is restart the app with >> consumers >> again and again. Each time I see rediliveryCount has been increased by 1 >> for >> any message remained the queue. >> >> This is how I have configured "maximumRedeliveries" >> >> <bean id="activeMQResourceAdapter" >> class="org.apache.activemq.ra.ActiveMQResourceAdapter"> >> <property name="serverUrl" value="tcp://192.121.139.110:61416"/> >> <property >> name="initialRedeliveryDelay"><value>2000</value></property> >> <property name="maximumRedeliveries"><value>3</value></property> >> <property >> name="redeliveryBackOffMultiplier"><value>2</value></property> >> <property >> name="redeliveryUseExponentialBackOff"><value>true</value></property> >> <property name="allPrefetchValues"><value>1</value></property> >> </bean> >> > > Try just configuring it on the URL for your RA. This is what I use: > > failover:(tcp://mq1.xxx:49995,tcp://mq2.xxx:49995)?jms.redeliveryPolicy.allPrefetchValues=1&jms.redeliveryPolicy.initialRedeliveryDelay=2000&jms.redeliveryPolicy.maximumRedeliveries=24&jms.redeliveryPolicy.useCollisionAvoidance=true > > I used to configure it with the bean properties and it worked, but this > was better for my project setup. > > -- > Christopher G. Stach II > > > -- View this message in context: http://www.nabble.com/Testing-%22maximumRedeliveries%22...-MDP-does-not-receives-messages-once-an-Exception-is-thrown...-tf3162722.html#a8774735 Sent from the ActiveMQ - User mailing list archive at Nabble.com.