From users-return-11800-apmail-qpid-users-archive=qpid.apache.org@qpid.apache.org Mon Feb 2 15:20:51 2015 Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F1383178B3 for ; Mon, 2 Feb 2015 15:20:50 +0000 (UTC) Received: (qmail 99382 invoked by uid 500); 2 Feb 2015 15:20:51 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 99350 invoked by uid 500); 2 Feb 2015 15:20:51 -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 99294 invoked by uid 99); 2 Feb 2015 15:20:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Feb 2015 15:20:44 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gsim@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; Mon, 02 Feb 2015 15:20:19 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t12FKDAG021449 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 2 Feb 2015 10:20:14 -0500 Received: from [10.36.116.98] (ovpn-116-98.ams2.redhat.com [10.36.116.98]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t12FKC8X013385 for ; Mon, 2 Feb 2015 10:20:13 -0500 Message-ID: <54CF9608.2090907@redhat.com> Date: Mon, 02 Feb 2015 15:21:44 +0000 From: Gordon Sim Organization: Red Hat UK Ltd, Registered in England and Wales under Company Registration No. 3798903, Directors: Michael Cunningham (USA), Matt Parsons (USA), Charlie Peters (USA), Michael O'Neill (Ireland) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: Is getAvailable() always 0 when capacity is 0? References: <54CF941E.7050605@pgs.com> In-Reply-To: <54CF941E.7050605@pgs.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Virus-Checked: Checked by ClamAV on apache.org On 02/02/2015 03:13 PM, Toralf Lund wrote: > The question is in the subject, really. To elaborate a bit, I'm talking > about receiving AMQP-0.10 messages via qpid::Messaging::receiver in C++. > Am I right to assume that getAvailable() only counts the messages > already in the receiver, meaning that it must have a non-0 capacity for > a meaningful output value? Correct. > I'm debugging an issue with an application where I've forgotten to call > setCapacity(), or failed to realise at the time that I should use that > method, if you know what I'm saying... The capacity controls the number of 'pre-fetched' messages, i.e. messages sent by the broker (or peer) in anticipation of subsequent fetch() calls. By default it is 0, meaning that messages are never sent prior to a fetch() but only in response to an explicit fetch(). The thinking behind this choice of default is that it led to more intuitive behaviour, but it's always hard to guess what is intuitive and its certainly subjective. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org