Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 59459 invoked from network); 21 Mar 2006 00:17:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Mar 2006 00:17:26 -0000 Received: (qmail 66050 invoked by uid 500); 21 Mar 2006 00:17:26 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 66027 invoked by uid 500); 21 Mar 2006 00:17:26 -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 66017 invoked by uid 99); 21 Mar 2006 00:17:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2006 16:17:26 -0800 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 james.strachan@gmail.com designates 64.233.182.207 as permitted sender) Received: from [64.233.182.207] (HELO nproxy.gmail.com) (64.233.182.207) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2006 16:17:25 -0800 Received: by nproxy.gmail.com with SMTP id x4so930223nfb for ; Mon, 20 Mar 2006 16:17:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZJDkuPXtvkkEbl1IhIeFzBn21t2nk7xy/SwCDqFbzLKaxMMVMez+t9wARNZLECsa/OdjPY6IdmlxTihJzll6yy0yn3JlCjx8QT5mmF5wKLjCfesO4vFwX6O+kYCW/NBhXUMv0WyYiD74CypYS77KQ60QuqtOI69aDSSfcmuacuM= Received: by 10.49.58.18 with SMTP id l18mr3122228nfk; Mon, 20 Mar 2006 16:17:03 -0800 (PST) Received: by 10.48.209.20 with HTTP; Mon, 20 Mar 2006 16:17:03 -0800 (PST) Message-ID: Date: Tue, 21 Mar 2006 00:17:03 +0000 From: "James Strachan" To: activemq-users@geronimo.apache.org Subject: Re: JMSPriority and retrieving message from queue by priority In-Reply-To: <441F383F.6060906@exist.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <441F383F.6060906@exist.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Agreed - I think the easiest way of working with JMS priorities (which few JMS providers implement well) is just to use a selector on subscriptions using the JMSPriority header. e.g. run lots of consumers with a selector of something like JMSPriority > 4 then a small number for low priority messages etc. This then gives you very fine grained control over what resources you give to different priority messages. James On 3/20/06, Adrian Co wrote: > Hi Kerry, > > You might consider using JMS headers and message selectors to implement > message priority handling. > > Refer to this forum thread: http://forums.activemq.org/posts/list/443.pag= e > > Regards, > Adrian Co > > Kerry Todyruik wrote: > > >Hi, > > > >I am fairly new to JMS and ActiveMQ. I was thinking that it would be use= ful > >to use a JMS queue as a priority queue, retrieving messages by priority > >rather than order of addition. I'm not sure where to go with this. Shoul= d I > >be able to do this with ActiveMQ? Can I set up a queue to order messages= by > >the JMSPriority field? > > > >If this is possible, could somebody point me to some documentation or > >provide an example? > > > >If it is not possible, what are some reasonable options? I could build m= y > >own DB-backed queue. I also thought that it might be possible to dynamic= ally > >route messages from one queue to one of 9 queues, one for each JMSPriori= ty > >value and then synchronously check these queues in order of priority. Do= es > >that sound like a reasonable solution? > > > >Thanks, > >Kerry Todyruik > > > > > > > > -- James ------- http://radio.weblogs.com/0112098/