Re: Session.setMessageListener not working in 5.3.2

2010-02-08 Thread Gary Tully
You can configure the destination prefetch on the broker configuration via a DestinationPolicy rather than on the destination in JNDI. Or on the connection factory. See: http://activemq.apache.org/what-is-the-prefetch-limit-for.html Prefetch 0 is useful for a polling consumer, a message is dispatc

Re: Session.setMessageListener not working in 5.3.2

2010-02-08 Thread colincrist
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 asynch

Re: Session.setMessageListener not working in 5.3.2

2010-02-04 Thread Gary Tully
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 attac

Re: Session.setMessageListener not working in 5.3.2

2010-02-04 Thread Rob Davies
will have a look ... On 4 Feb 2010, at 12:00, colincrist wrote: I meant version 5.3.0 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/PublicTestMess

Re: Session.setMessageListener not working in 5.3.2

2010-02-04 Thread colincrist
I meant version 5.3.0 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 > >