[
https://issues.apache.org/jira/browse/QPIDJMS-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14628309#comment-14628309
]
Alex Plischke commented on QPIDJMS-86:
--------------------------------------
Thanks for the quick reply Robbie,
we are currently using ActiveMQ 5.11.1.
As per page http://activemq.apache.org/per-destination-policies.html, I was
setting the "queuePrefetch" entry to 0. Which ended up showing 0 on the
consumer overview page as well, once the consumer was indeed connected. If I
leave this option out entirely and let the qpid client decide (default 200, or
whatever I set it to on the client, e.g. 0), then the server shows exactly the
value that the client specified.
So it's only if I set the queuePrefetch to something else on the broker side, I
have a discrepancy between what ActiveMQ thinks the prefetch is and the client.
I was under the impression (maybe wrongly so), that the broker can dictate
default values to the client, if the client does not override them with its own.
> AMQP 1.0 prefetch policy set to 0 by the broker results in no messages
> processed
> --------------------------------------------------------------------------------
>
> Key: QPIDJMS-86
> URL: https://issues.apache.org/jira/browse/QPIDJMS-86
> Project: Qpid JMS
> Issue Type: Bug
> Components: qpid-jms-client
> Affects Versions: 0.3.0
> Reporter: Alex Plischke
>
> My broker's default prefetch policy is set to 0 (using ActiveMQ).
> When my queue consumer connects to the broker, the broker reports that the
> consumer has indeed a prefetch of 0.
> The qpid client however, just uses the defaults defined in the
> JmsPrefetchPolicy class (ergo, 1000 for the queue).
> So when the qpid client tries to decide whether it needs to poll or not in
> JmsMessageConsumer...
> {noformat}
> protected void sendPullCommand(long timeout) throws JMSException {
> if (messageQueue.isEmpty() && (getPrefetchSize() == 0 ||
> isBrowser())) {
> connection.pull(getConsumerId(), timeout);
> }
> }
> {noformat}
> ... the if condition will be false, since the prefetch size returned here is
> 1000. Qpid will therefore not poll and the broker not push either, resulting
> in no messages processed.
> My current workaround is that I have to set the prefetch size on the client
> as well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]