qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: How does QPID handle many request
Date Mon, 27 Sep 2010 09:09:00 GMT
On 09/27/2010 03:46 AM, zhaoyi0113@gmail.com wrote:
>
> I set up a Listener on a queue and the callback method will take about 10
> seconds. I the producer side, it sends 1000 messages to this queue. Then the
> Listener will take one from the queue and cause 10 seconds to do its job.
> Before the listener deal with the first message, will be the other 999
> messages in the broker queue or they have been delivered to the Listener
> side?

That depends on the flow control options in use. With the c++ client API 
the default is for subscriptions to issue unlimited credit, in which 
case all messages will have been sent to the client queued up behind the 
Listener. You can alter that by changing the flow control in 
qpid::client::SubscriptionSettings.

In the new messaging API flow control is tied to the receivers capacity. 
By default this is 0, eliminating any prefetch. This means that a 
message will only be delivered in response to a fetch() call (which is 
the most intuitive in many cases, but does not perform as well). Setting 
the capacity to 10 will allow the client to 'prefetch' 10 messages to be 
held locally until obtained by the application through fetch() calls.

With the JMS client there is a value to control the maxprefetch (see 
http://qpid.apache.org/books/0.7/Programming-In-Apache-Qpid/html/ch03s02.html#id2589017).

(I believe this can perhaps also be set as a system property? Can anyone 
more familiar with the JMS client confirm?)

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message