You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by boday <be...@initekconsulting.com> on 2012/08/31 01:41:09 UTC

starvation with JMSPriority queues

lets say I have a single (slow) consumer from a priority queue and I produce
mostly high priority messages to it...will low priority messages ever get
processed (based on duration in the queue, etc)?

I know there are workarounds (manually promoting, resequencers, using
multiple queues, etc), but am curios about the default behavior and any AMQ
settings to get around starving low priority messages indefinitely.  





--
View this message in context: http://activemq.2283324.n4.nabble.com/starvation-with-JMSPriority-queues-tp4655864.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: starvation with JMSPriority queues

Posted by boday <be...@initekconsulting.com>.
thanks Gary...that makes sense...I just thought I'd check to see if there was
some built-in mechanism to handle this case...indefinite starvation is a
common concern for this pattern, but tricky to implement as you stated.  

for now, I suppose I can periodically check the queue for old messages and
increase their priority manually...I can't think of another elegant way to
handle this and maintain single-threaded consumption...


gtully wrote
> 
> that is really the point of a priority queue, to starve out low
> priority messages in favor of higher priority.
> There is currently no way to tell amq; "every now and again let some
> lower priority messages through". It begs lots of questions and it
> would be quite complex to achieve :-)
> 
> Priority support can be enabled on a per destination basis, so it need
> not be respected if you don't want it.
> 
> On 31 August 2012 00:41, boday &lt;ben.oday@&gt; wrote:
>> lets say I have a single (slow) consumer from a priority queue and I
>> produce
>> mostly high priority messages to it...will low priority messages ever get
>> processed (based on duration in the queue, etc)?
>>
>> I know there are workarounds (manually promoting, resequencers, using
>> multiple queues, etc), but am curios about the default behavior and any
>> AMQ
>> settings to get around starving low priority messages indefinitely.
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/starvation-with-JMSPriority-queues-tp4655864.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 
> 
> 
> -- 
> http://fusesource.com
> http://blog.garytully.com
> 




--
View this message in context: http://activemq.2283324.n4.nabble.com/starvation-with-JMSPriority-queues-tp4655864p4655894.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: starvation with JMSPriority queues

Posted by Gary Tully <ga...@gmail.com>.
that is really the point of a priority queue, to starve out low
priority messages in favor of higher priority.
There is currently no way to tell amq; "every now and again let some
lower priority messages through". It begs lots of questions and it
would be quite complex to achieve :-)

Priority support can be enabled on a per destination basis, so it need
not be respected if you don't want it.

On 31 August 2012 00:41, boday <be...@initekconsulting.com> wrote:
> lets say I have a single (slow) consumer from a priority queue and I produce
> mostly high priority messages to it...will low priority messages ever get
> processed (based on duration in the queue, etc)?
>
> I know there are workarounds (manually promoting, resequencers, using
> multiple queues, etc), but am curios about the default behavior and any AMQ
> settings to get around starving low priority messages indefinitely.
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/starvation-with-JMSPriority-queues-tp4655864.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://fusesource.com
http://blog.garytully.com