Return-Path: Delivered-To: apmail-geronimo-activemq-dev-archive@www.apache.org Received: (qmail 88616 invoked from network); 14 Oct 2006 22:48:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Oct 2006 22:48:05 -0000 Received: (qmail 77186 invoked by uid 500); 14 Oct 2006 22:48:05 -0000 Delivered-To: apmail-geronimo-activemq-dev-archive@geronimo.apache.org Received: (qmail 77161 invoked by uid 500); 14 Oct 2006 22:48:05 -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 77144 invoked by uid 99); 14 Oct 2006 22:48:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Oct 2006 15:48:04 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Oct 2006 15:48:04 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 780AA7142FE for ; Sat, 14 Oct 2006 15:47:17 -0700 (PDT) Message-ID: <21859765.1160866037486.JavaMail.jira@brutus> Date: Sat, 14 Oct 2006 15:47:17 -0700 (PDT) From: "Ivo Danihelka (JIRA)" To: activemq-dev@geronimo.apache.org Subject: [jira] Reopened: (AMQ-855) Add support for prefetchSize = 0 In-Reply-To: <21112865.1154453363111.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ https://issues.apache.org/activemq/browse/AMQ-855?page=3Dall ] Ivo Danihelka reopened AMQ-855: ------------------------------- =20 There remains a bug to be fixed. The method MessageConsumer.receive() does = not block at all when prefetchSize=3D0 is used. The current code for ActiveMQMessageConsumer.receive() behaves like ActiveM= QMessageConsumer.receiveNoWait(). The receive() could be fixed by using sen= dPullCommand(0) instead of sendPullCommand(-1). The sendPullCommand(0) work= s for me. Thanks. My usage of activemq includes distributed slow consumers, so I'm ve= ry happy to be able to use zero prefetch. Out of topic note: It seems to me that it would be safer to use AtomicBoolean for field Prefet= chSubscription.dispatching. > Add support for prefetchSize =3D 0 > -------------------------------- > > Key: AMQ-855 > URL: https://issues.apache.org/activemq/browse/AMQ-855 > Project: ActiveMQ > Issue Type: New Feature > Components: Broker > Affects Versions: 4.0.2, 4.0.1, 4.0 > Environment: any > Reporter: Vadim Pesochinskiy > Assigned To: Hiram Chirino > Priority: Critical > Fix For: 4.1 > > Attachments: ActiveMQMessageConsumer.java.patch3, ActiveMQMessage= Consumer.patch, ActiveMQMessageConsumer.patch2, PrefetchSubscription.java.p= atch2, PrefetchSubscription.java.patch3, PrefetchSubscription.patch, region= .QueueSubscription.java.patch, ZeroPrefetchConsumerTest.java.patch, ZeroPre= fetchConsumerTest.java.patch3 > > > This feature would enable to support following test case: > 2 servers are processing 3 submitted jobs with following processing times= 10 min, 1 min, 1 min. This sequence should finish in 10 minutes as one ser= vice will pick up the 10 minutes job, meanwhile the other one should manage= the two 1 minute jobs. Since I cannot set prefetchSize=3D0, one of the 1 m= inute jobs is sitting in prefetch buffer and the jobs are processed in 11 m= inutes instead of 10. > This is simplification of the real scenario where I have about 30 consume= rs submitting jobs to 20 consumers through AMQ 4.0.1. I have following prob= lems: > =95 Messages are sitting in prefetch buffer are not available to processo= rs, which results in a lot of idle time. > =95 Order of processing is random. For some reason Job # 20 is processed = after Job # 1500. Since senders are synchronously blocked this can result i= n time-outs. > =95 Some requests are real-time, i.e. there is a user waiting, so the sys= tem cannot wait, so AMQ-850 does not fix this issue. --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= ps://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira