activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Burton <bur...@spinn3r.com>
Subject Re: Better documentation for usePrefetchExtension? How do I disable prefetch until I commit()?
Date Sat, 31 Oct 2015 18:02:07 GMT
Nevermind!  I had a weird bug in my test.  Turns out it does exactly what I
expected it to do. New messages aren't dispatched until you call
acknowledge() or commit.. which is just what I want!

KEvin

On Sat, Oct 31, 2015 at 10:49 AM, Kevin Burton <burton@spinn3r.com> wrote:

> I'm finding the documentation for usePrefetchExtension to be rather
> lacking
>
> What exactly does it do?
>
> The documentation says:
>
> > the prefetch extension is used when a message is delivered but not
> acked, such that the broker can dispatch another message (e.g., prefetch ==
> 0), the idea being that there will always be prefetch num messages pending.
> It also allows a transaction batch to exceed the prefetch value.
>
> What I want to do is figure out a way for the broker to NOT send another
> message into the prefetch until the session I'm onhas either commit() or
> rollback().
>
> This way I am not sitting on a message doing nothing with it...
>
> We're using normal transacted sessions.. AKA:
>
>         Session session = connection.createSession( true,
> Session.SESSION_TRANSACTED );
>
> I *think* what is supposed to happen, is that normally, it extends the
> prefetch to be the number of messages read but unacknowledged PLUS the
> prefetch value.
>
> I would assume that if I disabled it and I haven't yet called session
> commit that I shouldn't get prefetched values.
>
> But that doesn't appear to be the case.  If I use a MessageListener or
> just manually receive I get a new MessageDispatch event after I receive the
> message.
>
>
>
> --
>
> We’re hiring if you know of any awesome Java Devops or Linux Operations
> Engineers!
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
>
>


-- 

We’re hiring if you know of any awesome Java Devops or Linux Operations
Engineers!

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message