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 8140DF72F for ; Tue, 16 Apr 2013 14:04:06 +0000 (UTC) Received: (qmail 53547 invoked by uid 500); 16 Apr 2013 14:04:06 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 53513 invoked by uid 500); 16 Apr 2013 14:04:06 -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 53486 invoked by uid 99); 16 Apr 2013 14:04:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Apr 2013 14:04:05 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of prvs=3818170da1=rhs@alum.mit.edu designates 18.7.68.17 as permitted sender) Received: from [18.7.68.17] (HELO alum-mailsec-scanner-5.mit.edu) (18.7.68.17) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Apr 2013 14:03:58 +0000 X-AuditID: 12074411-b7f286d0000008e8-0e-516d5a38de25 Received: from outgoing-alum.mit.edu (OUTGOING-ALUM.MIT.EDU [18.7.68.33]) by alum-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP id B4.7D.02280.83A5D615; Tue, 16 Apr 2013 10:03:36 -0400 (EDT) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) (authenticated bits=0) (User authenticated as rhs@ALUM.MIT.EDU) by outgoing-alum.mit.edu (8.13.8/8.12.4) with ESMTP id r3GE3ZII029887 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 16 Apr 2013 10:03:36 -0400 Received: by mail-vb0-f53.google.com with SMTP id i3so383643vbh.26 for ; Tue, 16 Apr 2013 07:03:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=4ESfqzzQeT5eL0nJPngrmp212o3aXhsbex0fyJnyLqk=; b=cnvJBnP3KZ6gmJwk30oPfMj44RVt/0wSNALYl0YbWuY38j+ni2j3Td4p8VGQems7JM B1Woj42ump35w41w9/YjOeOfnA9aBRySBZ2Nl27C1iPQXRli1nC/pB+Lp+zEwWyp3IuQ +6/KT/DgiAo49pvTjbnMfZliIzHU2fLK6w6ooy8iYyN/XF271I/rdeZLrV3WnvErkoka T+Nwno1JZJx2/Yx28wvHEocTzRflDHhStQpI6hNyaxeCKCT+A7kJC4IycnSzefSSNdWm HMY/X5lwcdU1jUp0uyBzEfhRfmynj/dVZ/jynFSQ5iZFja4CffYsHrQ0jW+FHMbDvUpg A8EQ== MIME-Version: 1.0 X-Received: by 10.52.75.8 with SMTP id y8mr1402219vdv.2.1366121015750; Tue, 16 Apr 2013 07:03:35 -0700 (PDT) Received: by 10.58.154.65 with HTTP; Tue, 16 Apr 2013 07:03:35 -0700 (PDT) In-Reply-To: References: Date: Tue, 16 Apr 2013 10:03:35 -0400 Message-ID: Subject: Re: Non blocking receive qpid proton From: Rafael Schloming To: users@qpid.apache.org Content-Type: multipart/alternative; boundary=bcaec5016299dd3a1c04da7ad519 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNKsWRmVeSWpSXmKPExsUixO6iqGsRlRtoMHG2kcXZFf8ZHRg9pt55 wBbAGMVtk5RYUhacmZ6nb5fAnbF2wUfmgunSFdP3XWZpYPwt1sXIySEhYCLx7ct3dghbTOLC vfVsXYxcHEIClxkl/nc2M4IkhATuMkl8OiEEkehjlPjy7T1YlYTASlaJq4s+g1XxCghKnJz5 hKWLkQMokSdx/qYtRLOXRPeBT2wgNqeAvcTfDRfYIeJ2EtNuPQKzWQRUJV7sW8AMMSZAYm3L YiYQW1hAV2La0jNg49kENCW2Xd4INkdEQFJiz8K3YPXMQPNXXv3FNIFRcBaSK2YhSUHYOhLv +h4wQ9jaEqt6zzLB2MsWvmZewMi6ilEuMac0Vzc3MTOnODVZtzg5MS8vtUjXVC83s0QvNaV0 EyMkwAV3MM44KXeIUYCDUYmHN0A+J1CINbGsuDL3EKMkB5OSKG9YeG6gEF9SfkplRmJxRnxR aU5q8SFGCQ5mJRHes45AOd6UxMqq1KJ8mJQ0B4uSOC/fEnU/IYH0xJLU7NTUgtQimKwMB4eS BO/5CKBGwaLU9NSKtMycEoQ0EwcnyHAuKZHi1LyU1KLE0pKMeFDMxxcDox4kxQO0dzFIO29x QWIuUBSi9RSjJcesrU9eM3Jc3QYid2x+8ZpRiCUvPy9VSpz3AEiDAEhDRmke3DpYmnvFKA70 vTDvIZAqHmCKhJv6CmghE9DCA6uyQRaWJCKkpBoYN69glNsRaszNu+AfO6vMsu/Sqxs7db9H Rza2fNHfUTL7rNnSG0FN0ctPMp8ScjD/zfp7ZUaSxmb32cvUFEpe/3XWFtZKuppcEvbV6Ndx yc37ThbXvaxff/hRAiPDzL6D7+Z5J2REqeyyWxv4PqJO4Nm27EX+CcsOHGxLqtnxT3eZv2bn fW1vJZbijERDLeai4kQAIjd1104DAAA= X-Virus-Checked: Checked by ClamAV on apache.org --bcaec5016299dd3a1c04da7ad519 Content-Type: text/plain; charset=ISO-8859-1 I'm a little confused by your question. Awakening only when a new message is added to the incoming queue sounds more like a blocking than a non-blocking receive. That said, you can certainly poll rather than block if you wish. Assuming you're using messenger, you can set the timeout of the messenger to zero. This will cause receive to return immediately rather than block waiting for incoming messages. You can then check to see if any messages were actually received by checking the size of the incoming queue. Hope this helps. If you describe a bit more about what you're trying to do then I might be able to give you a better answer. --Rafael On Tue, Apr 16, 2013 at 9:39 AM, Maki Camara wrote: > Hi, > > I would like to know if there is any means to do an non-blocking receive, > I mean I would like to be able to avoid the loop{while(true) as shown in > qpid proton examples} when listening, > I want my process awaken only when a new message is added in the incoming > queue. > > Thank you for your response > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.**org > For additional commands, e-mail: users-help@qpid.apache.org > > --bcaec5016299dd3a1c04da7ad519--