Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AD7ABD2F2 for ; Wed, 27 Jun 2012 06:15:39 +0000 (UTC) Received: (qmail 55694 invoked by uid 500); 27 Jun 2012 06:15:38 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 55540 invoked by uid 500); 27 Jun 2012 06:15:38 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 55520 invoked by uid 99); 27 Jun 2012 06:15:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2012 06:15:37 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2012 06:15:33 +0000 Received: by lbok6 with SMTP id k6so1402817lbo.32 for ; Tue, 26 Jun 2012 23:15:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=WntOgkXioLB/Dkqgaja1CpfUYGeGh54U0FZmDUAV5Gw=; b=NlFJAU8If/CkTCBhekq1rA6cBwNbc7UpggdhzC1+9oQ5Qa/xKLhO4N/iZWZSxzfkOA aW6jzUBg0SZFb3W3H7UgQgUHyDf0COJK9hgyx9vMqrmo6XQys62zOlOuOFP6PHcgKHT4 /nbdxlGT78SmWlQoW+fgoJkGKDGeSfHZmcLRy4soV8XqIX+0ZClqnlEg/z4TOx8inrzw eJjWQWVFhy+etq44h6TpOqlUrk5Ox36434biRN8AJ0iHiLBiGh6OsGKuqmk1wSnVbjjG ViL14wP3KEt52mv6Vp59g6lucQF84U7o8SwJc4GMxtgjjIvRhYIYp9EjDcCw/FEuiCwL Lf1w== Received: by 10.112.36.34 with SMTP id n2mr9191136lbj.62.1340777711680; Tue, 26 Jun 2012 23:15:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.49.73 with HTTP; Tue, 26 Jun 2012 23:14:51 -0700 (PDT) In-Reply-To: <1340760706336-5715134.post@n5.nabble.com> References: <1340760706336-5715134.post@n5.nabble.com> From: Claus Ibsen Date: Wed, 27 Jun 2012 08:14:51 +0200 Message-ID: Subject: Re: Throttling RoutePolicy based on JMS queue size To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi 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: http://camel.465427.n5.nabble.com/Throttling-RoutePolicy-based-on-JMS-queue-size-tp5715134.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cibsen@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen