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 <colincr...@hermesjms.com> 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.