qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhihua Che <zhihua....@gmail.com>
Subject Re: what does mean 'Capacity'?
Date Thu, 12 Jul 2012 12:41:13 GMT
2012/7/12 Gordon Sim <gsim@redhat.com>:
> On 07/12/2012 01:15 PM, Zhihua Che wrote:
>> According what you said, I think the capacity of the receiver is used
>> to speed up fetching action by prefetching the message.
>> It should not limit the number the message the receiver could fetch.
>> Right?
> Right.
> I've attached a simple example of what you described. When I run these, I
> see the receiver getting more than 100 messages, provided I start the sender
> first and allow the queue to build up a little before starting the receiver.
> Do you see the same?
> Note that because you are using Duration::IMMEDIATE for the receiver, it
> will return false if at any attempt to fetch there are no more messages.
> Since the sender is publishing synchronously, message come in to the queue
> much more slowly that they go out, so eventually it is likely that the
> receiver doesn't find a message.
> One solution there is to use a timeout of say 1 second, that would mean the
> fetch() call waist for up to a second for messages if there are none on the
> queue at the time. Another option is to simply wait and retry if fetch()
> returns false.
Yes, I didn't mention that but I did add a quick sleep after everytime
fetching the message failed.
I read your code, it's the same as mine.
I ran your code and  yes, the receiver fetched more than 100 messages.
It's wired...

I also watched your 'my-queue' by qpid-tool and found that your
'release' reaches the same number as 'acquires'
and your 'msgTotalDequeues' is 0.
The stats are not like mine queue.

To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

View raw message