camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Throttling RoutePolicy based on JMS queue size
Date Wed, 27 Jun 2012 06:14:51 GMT

Yeah that sounds like a good idea, instead of the logic from in flight
exchanges, you can implement logic that
checks the queue size, and then throttle based on that. You can grab
the queue size using JMX for example.

On Wed, Jun 27, 2012 at 3:31 AM, mattg <> wrote:
> We have a Camel application that essentially is broken up into 2 parts (say
> part A & part B). Part A of the app is more important than part B and
> currently if Part B is running slow while the whole app is under load
> (processing a high number of messages), the performance of Part A is
> degraded.
> What I'm looking at doing is suspending a couple of key Routes for Part B
> when a large number of messages comes in for Part A and then resuming again
> once the number of messages for Part A has decreased to an acceptable level.
> Using a RoutePolicy seems to be the ideal way to implement this.
> Rather than use the ThrottlingInflightRoutePolicy which is based on number
> of inflight exchanges, I'm looking to implement something similar but based
> on the size or inflight count of a specific JMS Queue. i.e. if a certain
> number of messages is on a JMS queue then suspend a route. Has anyone had
> any experience doing something similar?
> Would this be the best approach to giving routes a higher priority (or
> allocating more thread/CPU resource) than others?
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message