Return-Path: Delivered-To: apmail-geronimo-activemq-dev-archive@www.apache.org Received: (qmail 36581 invoked from network); 10 Aug 2006 19:03:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Aug 2006 19:03:28 -0000 Received: (qmail 66550 invoked by uid 500); 10 Aug 2006 19:03:22 -0000 Delivered-To: apmail-geronimo-activemq-dev-archive@geronimo.apache.org Received: (qmail 66518 invoked by uid 500); 10 Aug 2006 19:03:22 -0000 Mailing-List: contact activemq-dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-dev@geronimo.apache.org Received: (qmail 66480 invoked by uid 99); 10 Aug 2006 19:03:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 12:03:22 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [199.89.64.104] (HELO pivsbh2.ms.com) (199.89.64.104) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 12:03:09 -0700 Received: from pivsbh2.ms.com (localhost [127.0.0.1]) by localhost.ms.com (Postfix) with ESMTP id 9AFBD39AB6 for ; Thu, 10 Aug 2006 15:02:42 -0400 (EDT) Received: from ny16im02.ms.com (unknown [144.14.206.243]) by pivsbh2.ms.com (internal Postfix) with ESMTP id 775CE3A455 for ; Thu, 10 Aug 2006 15:02:42 -0400 (EDT) Received: from PAWEXOB01.msad.ms.com (pawexob01 [205.228.46.100]) by ny16im02.ms.com (Sendmail MTA Hub) with ESMTP id k7AJ2gt13026 for ; Thu, 10 Aug 2006 15:02:42 -0400 (EDT) Importance: normal Priority: normal Received: from PAWEXBH03.msad.ms.com ([205.228.46.226]) by PAWEXOB01.msad.ms.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 10 Aug 2006 15:02:41 -0400 Received: from NYWEXMB84.msad.ms.com ([144.203.227.11]) by PAWEXBH03.msad.ms.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 10 Aug 2006 15:02:41 -0400 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.504 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Pulling consumer design Date: Thu, 10 Aug 2006 15:02:41 -0400 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Pulling consumer design Thread-Index: Aca8rbuBCbRKCVBXQDen4R+GGz6RlQAASZtQ From: "Pesochinskiy, Vadim \(MSCIBARRA\)" To: X-OriginalArrivalTime: 10 Aug 2006 19:02:41.0679 (UTC) FILETIME=[8E25F9F0:01C6BCAF] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks a lot, this is great!!! In the standard amq distribution there is this all-including jar called incubator-activemq-4.0.1.jar. I cannot make maven build this. I use the following command, which creates all target jars but not the one I need. mvn -Dmaven.test.skip=3Dtrue package -----Original Message----- From: James Strachan [mailto:james.strachan@gmail.com]=20 Sent: Thursday, August 10, 2006 11:49 AM To: activemq-dev@geronimo.apache.org Subject: Re: Pulling consumer design On 8/10/06, Pesochinskiy, Vadim (MSCIBARRA) wrote: > James, > > One way to implement this, which I think will fit with current design=20 > is to introduce a MessagePullCommand, which informs the broker that=20 > consumer is ready to accept next message. When broker get this request > it dispatches one message to this consumer. What do you think about=20 > this? Good idea. Actually if you check SVN trunk I committed something like this about an hour ago :) I'm just committing a test case that shows it working as I type (ZeroPrefetchConsumerTest) :) So basically prefetch of zero can be supported for synchronous consumers (where receive(long) or receive() is called). We throw an exception if you try and use it for async subscription (consumer.setMessageListener()). The one issue with the current implementation is that the receive(timeout) must wait long enough for a message to arrive from the broker; otherwise the method may return but a message is dispatched just shortly afterwards. So provided you give a reasonably large receive(timeout) then it should do what you need. --=20 James ------- http://radio.weblogs.com/0112098/ -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender = does not intend to waive confidentiality or privilege. Use of this email = is prohibited when received in error.