Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 84221 invoked from network); 8 Feb 2010 09:59:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Feb 2010 09:59:11 -0000 Received: (qmail 58856 invoked by uid 500); 8 Feb 2010 09:59:11 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 58817 invoked by uid 500); 8 Feb 2010 09:59:10 -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 58807 invoked by uid 99); 8 Feb 2010 09:59:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 09:59:10 +0000 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 (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 09:59:00 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NeQO7-0001VA-HL for users@activemq.apache.org; Mon, 08 Feb 2010 01:58:39 -0800 Message-ID: <27497580.post@talk.nabble.com> Date: Mon, 8 Feb 2010 01:58:39 -0800 (PST) From: colincrist To: users@activemq.apache.org Subject: Re: Session.setMessageListener not working in 5.3.2 In-Reply-To: <3a73c17c1002041042u3c950029jb8893609081ba16b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: colincrist@hermesjms.com References: <27451302.post@talk.nabble.com> <3a73c17c1002041042u3c950029jb8893609081ba16b@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Gary, Thanks for the workaround but this only works with synchronous consumers - when I use the same topic (obtained from JNDI in reality - unlike the code I shared) with an async consumer I get: javax.jms.JMSException: Illegal prefetch size of zero. This setting is not supported for asynchronous consumers please set a value of at least 1 at org.apache.activemq.ActiveMQMessageConsumer.setMessageListener(ActiveMQMessageConsumer.java:377) This means I would need to have different topics in JNDI for different styles of consumer. Ugly. The root cause is clearly a bug that needs fixing - is there a way to raise it somewhere? Colin. Gary Tully wrote: > > with prefetch=0 it should work ok as this will force a receive() to poke > the > broker rather than depending on async delivery. > > change: > > queue = session.createQueue("TEST"); > > to > > queue = session.createQueue("TEST?consumer.prefetchSize=0"); > > > On 4 February 2010 11:33, colincrist wrote: > >> >> See attached unit test. The receiveOneMessageUsingSessionListener() test >> hangs. >> >> Tests all work okay with, for example, Tibco EMS. >> >> http://old.nabble.com/file/p27451302/PublicTestMessageExchange.java >> PublicTestMessageExchange.java >> >> Regards, >> >> Colin. >> -- >> View this message in context: >> http://old.nabble.com/Session.setMessageListener-not-working-in-5.3.2-tp27451302p27451302.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > -- > http://blog.garytully.com > > Open Source Integration > http://fusesource.com > > -- View this message in context: http://old.nabble.com/Session.setMessageListener-not-working-in-5.3.2-tp27451302p27497580.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.