On 01/08/2010 06:05 AM, denny86 wrote:

Further research, i found that queue with min queue depth will dequeue the
message even if i dont acquire and accept those messages in that queue. How
is that possible? I didnt turn on auto delete.

  To verify that if have not gone wrong somewhere,  I checked the instances
of subscription class for each queue, and they belong exactly to where they
should. Also i checked that i have three SequenceSet objects for each queue
and acquire/accept is done within separated threads being spawn. Threads are
spawn after receiving 1000 messages for each queue. As doing at every
retrieval, is causing poor performance.

Also i tired to call getAcquired() of each SequenceSet objects and forcibly
tried to acquire those messages. But it didnt work out. One thing i need to
point out here is that regardless of any case getAccepted() always returns
'0'. why is that so? While queuestats reports some high queue depth.

Do you mean getUnaccepted()? Ids are only moved to that set after you have successfully acquired them. They are then removed when you accept them. So unless you check that set between the acquire() and accept() the size will be 0. If the size of the unaccepted set is 0 after the acquire call then none of the messages could be acquired - you can confirm that be checking that the unacquired set doesn't change. Failure to acquire means that the message has been acquired by some other subscriber.

Maybe worth asking as an aside at this point why it is you want to subscribe in unacquired mode? Do you want to acquire every message you receive? If so the pre-acquired mode will do that more simply and efficiently.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to