Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 26736 invoked from network); 4 Feb 2010 14:01:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Feb 2010 14:01:57 -0000 Received: (qmail 42635 invoked by uid 500); 4 Feb 2010 14:01:57 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 42610 invoked by uid 500); 4 Feb 2010 14:01:56 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 42600 invoked by uid 99); 4 Feb 2010 14:01:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 14:01:56 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aconway@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 14:01:49 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o14E1Ruf022410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Feb 2010 09:01:28 -0500 Received: from [10.11.9.5] (vpn-9-5.rdu.redhat.com [10.11.9.5]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o14E1POI011472; Thu, 4 Feb 2010 09:01:26 -0500 Message-ID: <4B6AD335.9020208@redhat.com> Date: Thu, 04 Feb 2010 09:01:25 -0500 From: Alan Conway Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1 MIME-Version: 1.0 To: users@qpid.apache.org CC: Andrew L Subject: Re: Leave (peek) message on queue References: <848DF4664832344BA1A3057BC43483756AFFB6@EXMAIL.usi.mizuho-sc.com>,<4B685B81.7040109@redhat.com>, In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 On 02/03/2010 05:16 PM, Andrew L wrote: > > Changing the code to this obtained the desired result: > > SubscriptionManager idSubscription(session); > Message m; > > LocalQueue lq; > qpid::sys::Duration duration(1000000000); > > std::string queue("queue"); > std::string unique = qpid::framing::Uuid(true).str(); > idSubscription.subscribe(lq, queue, SubscriptionSettings(FlowControl::messageCredit(1), qpid::framing::message::ACCEPT_MODE_NONE, qpid::framing::message::ACQUIRE_MODE_NOT_ACQUIRED, 0), unique); > lq.get(m, duration); > > > It appears that SubscriptionManager::get uses a separate SubscriptionSettings and thus was not honoring the previous calls to configure the settings from the SubscriptionManager::setAccetMode, etc. > > That's correct - I'll update the API comment to make this more clear, I can see why you were misled. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org