I think this is because when you set prefetch to 0, your consumer must use the receive method to 'pull' messages from the broker; the broker will not 'push' messages to the consumer.
Joe http://www.ttmsolutions.com - get a free ActiveMQ user guide Eugeny N Dzhurinsky-2 wrote: > > On Wed, Oct 29, 2008 at 05:06:33PM +0000, Rob Davies wrote: >> Hi Eugeny, >> >> As James stated earlier - you need to set the prefetch - but the value >> should be 0 - this will make ActiveMQ 'pull' rather than 'push' > > This doesn't work: > > 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:358) > > if I set URL to this value: > > private static final String CONNECTION_URL = > "vm://localhost?broker.persistent=false&jms.prefetchPolicy.all=0"; > > -- > Eugene N Dzhurinsky > > > -- View this message in context: http://www.nabble.com/CLIENT_ACKNOWLEDGE-mode-for-a-session-misunderstanding--tp20210783p20257226.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.