You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Celso Pinto <cp...@7syntax.com> on 2008/06/30 13:53:17 UTC

prefetchExtension on the PrefetchSubscription

Hi all,

I'm trying to debug the fact that when acknowledging a message, while in
a transaction, using STOMP I get two messages immediately, even if I set
activemq.prefetchSize to 1. 

So far this foray has taken me into the PrefetchSubscription class and I
think there are some bugs in it with regards to the prefetchExtension
calculation but to be sure I need to understand exactly what
prefetcthExtension does and how does it impact other stuff?

FYI, the possible bug I've found is in the following code, at line 230
(at least in 5.1.0's code):

prefetchExtension = Math.max(prefetchExtension, index + 1);

if index is 1, prefetchExtension 0 (or 1) the result is that
prefetchExtension is 2, which will dispatch 2 messages without waiting
for an ACK on the client side.

Any guidance is deeply appreciated.

TIA,
Celso