You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by vhle01 <vh...@gmail.com> on 2015/01/30 00:12:36 UTC

Why does the AdvisoryConsumer only ACK messages once it reaches 75% of prefetch?

While running through some test, I noticed that the AdvisoryConsumer, which
is created automatically if you have watchTopicAdvisories enabled, is only
acknowledging message once it reaches 75% of prefetch. Is there any
particular reason for that? It just seems a little strange. On the broker, I
can see that the messages are being delivered but not acknowledged.

Can someone provide a good explanation for this? Or is this a minor bug?

Here's a link to the class...lines 68-78:
https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=blob;f=activemq-client/src/main/java/org/apache/activemq/AdvisoryConsumer.java;h=1e65ffb06b7ff1c01f3405dde1a84def9a0b4aa1;hb=refs/heads/trunk



--
View this message in context: http://activemq.2283324.n4.nabble.com/Why-does-the-AdvisoryConsumer-only-ACK-messages-once-it-reaches-75-of-prefetch-tp4690688.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Why does the AdvisoryConsumer only ACK messages once it reaches 75% of prefetch?

Posted by "Brian D. Johnson" <br...@thejohnsonfamily.name>.
The default topic prefetch in ActiveMQPrefetchPolicy is 32767, which means
the broker is keeping around references to at least ~24500 messages per
client before the client's first ACK.  Unless there is an extremely high
volume of temporary destinations being created, this 75% limit seems to be
set arbitrarily high based on ActiveMQ's default configuration.  I second
the request to revisit this.  At a minimum, the 75% threshold should be
reduced to something more reasonable.  Ideally, the ActiveMQ client would
auto-ACK Advisory messages or provide a configuration option (for clients
experiencing performance issues) to ACK these messages in reasonable batch
sizes.


On Thu, Jan 29, 2015 at 7:07 PM, artnaseef <ar...@artnaseef.com> wrote:

> It is intentional to improve performance.  Sending an ack for every message
> increases overhead.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Why-does-the-AdvisoryConsumer-only-ACK-messages-once-it-reaches-75-of-prefetch-tp4690688p4690690.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>

Re: Why does the AdvisoryConsumer only ACK messages once it reaches 75% of prefetch?

Posted by artnaseef <ar...@artnaseef.com>.
It is intentional to improve performance.  Sending an ack for every message
increases overhead.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Why-does-the-AdvisoryConsumer-only-ACK-messages-once-it-reaches-75-of-prefetch-tp4690688p4690690.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.