qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lixucheng <li...@cn.ibm.com>
Subject Re: How to turn off pre-fetched when browse LVQ
Date Wed, 25 Jun 2014 03:55:12 GMT

Hi Oleksandr,

I have tried to add maxprefetch='1' property on the connection URL, and
browse the LVQ, but the "Pre-fetched:" attribute in LVQ also increased. As
below screen shot from Qpid web console.

1) I do not browse the queue.

2) I browse the queue once.

3) I browse the queue twice.

Below is my JMS client code, Could you please help to check whether I also
need to add some codes to avoid the pre-fetched increasing. Thanks.

import java.util.Enumeration;

import javax.jms.Connection;
import javax.jms.MapMessage;
import javax.jms.Queue;
import javax.jms.QueueBrowser;
import javax.jms.Session;

import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.AMQQueue;

Connection connection = new AMQConnection(

Session session = connection.createSession(true, Session.SESSION_TRANSACTED
Queue queue = new AMQQueue("ADDR:my_queue");
QueueBrowser browser = session.createBrowser(queue);

Enumeration<?> enumeration = browser.getEnumeration();
while (enumeration.hasMoreElements()) {
	MapMessage map = (MapMessage) enumeration.nextElement();

Best Regards,

Li Xu Cheng

From:	"Oleksandr Rudyy [via Qpid]" <ml-node
To:	Xu Cheng Li/China/IBM@IBMCN,
Date:	2014/06/24 18:23
Subject:	Re: How to turn off pre-fetched when browse LVQ


The maximum prefetch value is set to 500 by default in Qpid JMS client for
AMQP 0.10 and 0.8/0.9.x protocols.

You cannot turn it off by you can set it to 1 or any other value.
The max prefetch value can be set either as a connection URL option or as
JVM setting. Please, read [1] or [2] for details how to set it up.

Kind Regards,



On 23 June 2014 12:31, lixucheng <[hidden email]> wrote:

> When I use JMS to browse my LVQ, why the queue attribute "Pre-fetched:"
> always increase, for example: when I browse 5 messages, the pre-fetched
> will
> be 5 msgs, when I browse the 5 messages again, the pre-fetched will
> increase
> to 10 msgs. Dose anyone know how to turn off the pre-fetched, or set to a

> fix value, do not increase always? Thanks.
> --
> View this message in context:

> Sent from the Apache Qpid users mailing list archive at Nabble.com.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

If you reply to this email, your message will be added to the discussion

To unsubscribe from How to turn off pre-fetched when browse LVQ, click here

3F345097.gif (10K) <http://qpid.2158936.n2.nabble.com/attachment/7609638/0/3F345097.gif>
3F527893.gif (3K) <http://qpid.2158936.n2.nabble.com/attachment/7609638/1/3F527893.gif>
3F421120.gif (3K) <http://qpid.2158936.n2.nabble.com/attachment/7609638/2/3F421120.gif>
graycol.gif (144 bytes) <http://qpid.2158936.n2.nabble.com/attachment/7609638/3/graycol.gif>

View this message in context: http://qpid.2158936.n2.nabble.com/How-to-turn-off-pre-fetched-when-browse-LVQ-tp7609553p7609638.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message