activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: Q Consumers stop receiving messages
Date Tue, 13 Jan 2009 19:43:45 GMT
On Tue, Jan 13, 2009 at 12:35 PM, IBeaumont <IBeaumont@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)U8V4\@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/

Mime
View raw message