activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin C." <mart...@gmx.at>
Subject Re: Dispatch Policy
Date Wed, 27 Jul 2011 03:25:37 GMT
Hi,

The only issue with Spring's DefaultMessageListenerContainer we have
encountered with prefetch 0 was that the stop() method caused threads
to keep hanging in the DefaultMessageListenerContainer on shutdown,
because the receive(timeout) call of ActiveMQ uses a non-timed-out
read to the broker in this case (i.e. it delegates the timeout to the
broker) for a MessagePull it will never receive as the connection is
stopped. If you are using DefaultMessageListenerContainer, maybe you
can sub-class it and re-implement stop() in a way to wait for all
polling threads to exit before calling connection.stop().

Best regards,
Martin

On Tue, Jul 26, 2011 at 11:15 PM, yousafsajjad <muhammad_yousaf@dell.com> wrote:
> I am not sure whether this will work or not.
>
> I want consumers to poll for messages instead of broker pushing them to
> different consumers in a round robin fashion. I am not able to set prefetch
> limit equal 0 before of Spring framework.
>
> Any ideas that might help asynchronous consumers to poll for messages
> without setting prefetch limit to 0?
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Default-Dispatch-Policy-and-Pending-message-Limit-Strategy-tp2365262p3697021.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
View raw message