Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 64480 invoked from network); 2 Feb 2007 20:03:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Feb 2007 20:03:24 -0000 Received: (qmail 49935 invoked by uid 500); 2 Feb 2007 20:03:30 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 49706 invoked by uid 500); 2 Feb 2007 20:03:29 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 49697 invoked by uid 99); 2 Feb 2007 20:03:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 12:03:29 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 12:03:19 -0800 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HD4cd-0001oZ-7G for users@activemq.apache.org; Fri, 02 Feb 2007 12:02:59 -0800 Message-ID: <8774735.post@talk.nabble.com> Date: Fri, 2 Feb 2007 12:02:59 -0800 (PST) From: Nilantha To: users@activemq.apache.org Subject: Re: Testing "maximumRedeliveries"... MDP does not receives messages once an Exception is thrown... In-Reply-To: <45C38A89.6000003@ldsys.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: Nilantha.Jayalath@autodata.net References: <8772945.post@talk.nabble.com> <45C38A89.6000003@ldsys.net> X-Virus-Checked: Checked by ClamAV on apache.org Nilantha wrote: > > I did the change as suggested(had to replace '&' with ';') > > > 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" >> >> > class="org.apache.activemq.ra.ActiveMQResourceAdapter"> >> >> > name="initialRedeliveryDelay">2000 >> 3 >> > name="redeliveryBackOffMultiplier">2 >> > name="redeliveryUseExponentialBackOff">true >> 1 >> >> > > 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.