So in IRC I asked this question and Gordon suggested the following,
which I followed:

1. Create a new queue:
  a. I have the test generated a purely random name.
  b. I create the queue using:
    abcde;{create:always,node:{x-declare:{arguments:{'qpid.max_count':10}}}}

2. Create a sender.

3. Send 10 messages to the queue.
  a. I accidentally sent 11 initially and blew it up, so the queue is
     definitely only allowed 10 messages.
  b. The last message is simply "DONE"

4. Call Session.sync :block => true
  a. This call is immediately returning.

5. Create a receiver.

6. Receive the messages.
  a. Exit when "DONE" is received.

The odd thing is, as I mention in 4a above, the call to session.sync
should block (as I understand it) until at least two messages are popped
out of the queue since it's at full capacity when I send the 10 messages
initially.

So why does this exist immediately? Is there some better way to fill the
queue and force Session.sync to block indefinitely?

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/

Attachment: pgp3Z03Wirp0j.pgp
Description: PGP signature

Reply via email to