activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Celso Pinto <cpi...@7syntax.com>
Subject prefetchExtension on the PrefetchSubscription
Date Mon, 30 Jun 2008 11:53:17 GMT
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




Mime
View raw message