activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: JMSPriority and retrieving message from queue by priority
Date Tue, 21 Mar 2006 00:17:03 GMT
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.


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:
> Regards,
> Adrian Co
> Kerry Todyruik wrote:
> >Hi,
> >
> >I am fairly new to JMS and ActiveMQ. I was thinking that it would be useful
> >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. Should 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 my
> >own DB-backed queue. I also thought that it might be possible to dynamically
> >route messages from one queue to one of 9 queues, one for each JMSPriority
> >value and then synchronously check these queues in order of priority. Does
> >that sound like a reasonable solution?
> >
> >Thanks,
> >Kerry Todyruik
> >
> >
> >



View raw message