You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Kevin Burton <bu...@spinn3r.com> on 2015/03/02 01:08:10 UTC

Bug in TopicSubscription (wrong log message?)

This looks like a but.  The log message is hard wired to say “*twice* its
prefetch limit pending” but the if statement doesn’t have anything like a
2x modifier.  So perhaps this log line just needs to be re-written?

If you guys agree I’ll create a JIRA for it.

            if (info.getPrefetchSize() > 1 && matched.size() >
info.getPrefetchSize()) {
                // Slow consumers should log and set their state as such.
                if (!isSlowConsumer()) {
                    LOG.warn("{}: has twice its prefetch limit pending,
without an ack; it appears to be slow", toString());


-- 

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>
<http://spinn3r.com>

Re: Bug in TopicSubscription (wrong log message?)

Posted by Kevin Burton <bu...@spinn3r.com>.
Gotcha.  That makes sense.  OK.

On Sun, Mar 1, 2015 at 6:31 PM, Tim Bain <tb...@alumni.duke.edu> wrote:

> The statement is right, because the other 1x is in the consumer's prefetch
> buffer.  It's a bit confusing that the word "pending" in the log line
> counts both the pending queue on the broker and the prefetch buffer on the
> client, but the intent is definitely right.  If you have a better word
> ("unconsumed", maybe), you could propose a wording change, but it would be
> wordsmithing the log line rather than changing the actual meaning.
>
> I actually think that the "without an ack" part of that log line is the
> more inaccurate bit; you can be acking messages left and right, but if
> you're doing it slower than they're coming in you're still going to end up
> considered slow eventually.
>
> Tim
>
> On Sun, Mar 1, 2015 at 5:08 PM, Kevin Burton <bu...@spinn3r.com> wrote:
>
> > This looks like a but.  The log message is hard wired to say “*twice* its
> > prefetch limit pending” but the if statement doesn’t have anything like a
> > 2x modifier.  So perhaps this log line just needs to be re-written?
> >
> > If you guys agree I’ll create a JIRA for it.
> >
> >             if (info.getPrefetchSize() > 1 && matched.size() >
> > info.getPrefetchSize()) {
> >                 // Slow consumers should log and set their state as such.
> >                 if (!isSlowConsumer()) {
> >                     LOG.warn("{}: has twice its prefetch limit pending,
> > without an ack; it appears to be slow", toString());
> >
> >
> > --
> >
> > 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>
> > <http://spinn3r.com>
> >
>



-- 

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>
<http://spinn3r.com>

Re: Bug in TopicSubscription (wrong log message?)

Posted by Tim Bain <tb...@alumni.duke.edu>.
The statement is right, because the other 1x is in the consumer's prefetch
buffer.  It's a bit confusing that the word "pending" in the log line
counts both the pending queue on the broker and the prefetch buffer on the
client, but the intent is definitely right.  If you have a better word
("unconsumed", maybe), you could propose a wording change, but it would be
wordsmithing the log line rather than changing the actual meaning.

I actually think that the "without an ack" part of that log line is the
more inaccurate bit; you can be acking messages left and right, but if
you're doing it slower than they're coming in you're still going to end up
considered slow eventually.

Tim

On Sun, Mar 1, 2015 at 5:08 PM, Kevin Burton <bu...@spinn3r.com> wrote:

> This looks like a but.  The log message is hard wired to say “*twice* its
> prefetch limit pending” but the if statement doesn’t have anything like a
> 2x modifier.  So perhaps this log line just needs to be re-written?
>
> If you guys agree I’ll create a JIRA for it.
>
>             if (info.getPrefetchSize() > 1 && matched.size() >
> info.getPrefetchSize()) {
>                 // Slow consumers should log and set their state as such.
>                 if (!isSlowConsumer()) {
>                     LOG.warn("{}: has twice its prefetch limit pending,
> without an ack; it appears to be slow", toString());
>
>
> --
>
> 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>
> <http://spinn3r.com>
>