On Tue, Jan 13, 2009 at 12:35 PM, IBeaumont <ibeaum...@categoric.com> wrote:
>
> I'm sending a mixture of persistent and non persistent messages.
>
> I have seen a negative queue count before so will look at the trunk.
>
> Can't see anything unusal in JConsole, but I have just downlaoded the source
> and in the ActiveMQMessageConsumer.receiveNoWait there are these lines...
>        if (info.getPrefetchSize() == 0) {
>            md = dequeue(-1); // We let the broker let us know when we
>            // timeout.
>        } else {
>            md = dequeue(0);
>        }
>
> So that explains why my consumes seem to hang when things go wrong - because
> they wait forever because I have a prefetchSize of zero.
>
> I've now changed me code so that instead of using receiveNoWait, I'll use
> "receive" with a short timeout.  Hopefully then things will timeout and
> messages will contiue to be processed.  I'll then need to find out if all
> any messages get skipped.   ALthough that doesn't help find the cause.

I'm just curious, instead of using the synchronous methods have you
considered using the asynchronous API by implementing a
MessageListener?

Bruce
-- 
perl -e 'print 
unpack("u30","D0G)u8...@4vyy9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Reply via email to