Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 11242 invoked from network); 4 May 2006 04:28:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 May 2006 04:28:17 -0000 Received: (qmail 2104 invoked by uid 500); 4 May 2006 04:28:17 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 1967 invoked by uid 500); 4 May 2006 04:28:16 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 1958 invoked by uid 99); 4 May 2006 04:28:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 May 2006 21:28:16 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of chirino@gmail.com designates 64.233.162.192 as permitted sender) Received: from [64.233.162.192] (HELO nz-out-0102.google.com) (64.233.162.192) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 May 2006 21:28:16 -0700 Received: by nz-out-0102.google.com with SMTP id q3so373748nzb for ; Wed, 03 May 2006 21:27:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=d5d8/VLu26QNr9Bo9i1WILvkXHLbAcVN3kiEzGDlOlRCSf/9qZODa1l53NEQmyP6djXaqHkQAdBvOTIjuPiwOqGmRXp75WbnrFphmjD97FnANI29Mzo5wWE346NKjZ5AurDqCXP5/CLVmzXRRShTCug7Ty6q0xzU8+hcwU0HkoA= Received: by 10.64.193.18 with SMTP id q18mr103056qbf; Wed, 03 May 2006 21:27:54 -0700 (PDT) Received: by 10.65.230.12 with HTTP; Wed, 3 May 2006 21:27:54 -0700 (PDT) Message-ID: Date: Thu, 4 May 2006 00:27:54 -0400 From: "Hiram Chirino" Sender: chirino@gmail.com To: activemq-users@geronimo.apache.org Subject: Re: Message prioritization In-Reply-To: <4215527.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4215527.post@talk.nabble.com> X-Google-Sender-Auth: dc8b05011de9ac33 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N HI Attila, Your right on all counts. Something like the PriorityQueue should do the trick but it would need to be done on the PrefetchSubscription's pending list. The message list of the Queue is not used unless the Queue is filling a new consumer. The hard part in implementing this is making supporting priority a configurable policy option configured via activemq.xml. Supporting priority adds overhead that most JMS applications do not need to incur and should be off by default. Please submit us a patch if you get this implemented. On 5/3/06, Attila_Szegedi wrote: > > What's the current state of the message priority support in ActiveMQ? It > looks to me like it was in there previously, but is gone again in 4.0 as > witnessed by AMQ-122 Jira issue... At least from my initial 2-hour analys= is > of the latest SVN source code, it looks like there's no prioritization in > org.apache.activemq.broker.region.Queue (am I looking in the right place = at > all?) - it uses a LinkedList for messages. > > I was wondering if this would be as easy as replacing the "LinkedList > messages" member of the Queue class with a PriorityQueue and have priorit= y > stored in MessageReference objects and implement a Compator for the prior= ity > queue on them with lexicographical comparison of (priority, message seque= nce > number). There's probably an additional gotcha with selector interaction > (AMQ-337) that I don't know where in the code should it be addressed... > > So, my question boils down to: does ActiveMQ 4.0 support message > prioritization, and if not, how hard would it be to implement? > -- > View this message in context: http://www.nabble.com/Message-prioritizatio= n-t1551775.html#a4215527 > Sent from the ActiveMQ - User forum at Nabble.com. > > -- Regards, Hiram