Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 19495 invoked from network); 7 Jul 2009 11:18:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jul 2009 11:18:55 -0000 Received: (qmail 79923 invoked by uid 500); 7 Jul 2009 11:19:05 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 79881 invoked by uid 500); 7 Jul 2009 11:19:05 -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 79871 invoked by uid 99); 7 Jul 2009 11:19:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 11:19:04 +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 (nike.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; Tue, 07 Jul 2009 11:18:55 +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 n67BIXrD030277 for ; Tue, 7 Jul 2009 07:18:33 -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 n67BIWab028372 for ; Tue, 7 Jul 2009 07:18:33 -0400 Received: from [10.11.12.55] (vpn-12-55.rdu.redhat.com [10.11.12.55]) by pobox.fab.redhat.com (8.13.1/8.13.1) with ESMTP id n67BIUsY007035 for ; Tue, 7 Jul 2009 07:18:31 -0400 Message-ID: <4A533097.7030503@redhat.com> Date: Tue, 07 Jul 2009 12:25:11 +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: SubcriptionManager run References: <798253.60839.qm@web46107.mail.sp1.yahoo.com> In-Reply-To: <798253.60839.qm@web46107.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, > > I have implemented a reader class to asynchronously received msg from the broker. > For that i have derived from MessageListener and implemented the receive function. > > to start recived i have called subscriptionManager run function but > > the control of the program doesn't return from the run function unless we call cancel > in the receive function . > > I want the control to return from run. is there any way to do that The purpose of SubscriptionManager::run() is to dispatch incoming messages to registered listeners which is why it does not return. If you wish to have the dispatching done on a separate thread (created by the qpidc library) you can use SubscriptionManager::start() (don't forget to call SubscriptionManager::wait() before exiting). --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org