Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 84629 invoked from network); 13 Jul 2009 13:37:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jul 2009 13:37:19 -0000 Received: (qmail 24408 invoked by uid 500); 13 Jul 2009 13:37:28 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 24372 invoked by uid 500); 13 Jul 2009 13:37:28 -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 24359 invoked by uid 99); 13 Jul 2009 13:37:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2009 13:37:28 +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 gsim@redhat.com designates 66.187.233.31 as permitted sender) Received: from [66.187.233.31] (HELO mx1.redhat.com) (66.187.233.31) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2009 13:37:20 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n6DDavti024648 for ; Mon, 13 Jul 2009 09:36:59 -0400 Received: from pobox.fab.redhat.com (pobox.fab.redhat.com [10.33.63.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6DDatoo005120 for ; Mon, 13 Jul 2009 09:36:56 -0400 Received: from [10.11.12.170] (vpn-12-170.rdu.redhat.com [10.11.12.170]) by pobox.fab.redhat.com (8.13.1/8.13.1) with ESMTP id n6DDScuH005095 for ; Mon, 13 Jul 2009 09:28:38 -0400 Message-ID: <4A5B3822.4090104@redhat.com> Date: Mon, 13 Jul 2009 14:35:30 +0100 From: Gordon Sim Organization: Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.,Registered in England and Wales under Company Registration No. 3798903,Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland) User-Agent: Thunderbird 1.5.0.2 (X11/20060501) MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: localqueue get References: <25899.63527.qm@web46112.mail.sp1.yahoo.com> In-Reply-To: <25899.63527.qm@web46112.mail.sp1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Virus-Checked: Checked by ClamAV on apache.org Nithesh Shetty wrote: > hi, > > the listener sample has the following settings; > SubscriptionManager subscriptions(session); > SubscriptionSettings settings; > settings.acceptMode = ACCEPT_MODE_EXP; > settings.acquireMode = ACQUIRE_MODE_PRE_ACQUIRED; > LocalQueue local_queue; > subscriptions.subscribe(local_queue, "RMS", settings, "rmsset"); > Message message = local_queue.get(); > > > before getting the message i put a breakpoint over here and i execute another exe to get the message(timeout infinity) but it hangs till the above code gets the message and closes the connection. Thats because the message has been acquired by the client that you have stopped. Note also that with the local queue, the auto-acking behaviour is to accept the message before returning it. So after the get() above, the message will have been dequeued. If you don't want this you need to turn off auto-acking (e.g. settings.autoAck = 0) and handle issuing the accept yourself. Further, as you are not using any flow control, the first client will likely have several other acquired (but unaccepted) messages in the local queue. If you want to avoid that set some flow control (e.g. settings.flowControl = FlowControl::messageWindow(1)). --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org