Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 15291 invoked from network); 28 Oct 2009 07:16:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Oct 2009 07:16:06 -0000 Received: (qmail 6595 invoked by uid 500); 28 Oct 2009 07:16:05 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 6543 invoked by uid 500); 28 Oct 2009 07:16:05 -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 6530 invoked by uid 99); 28 Oct 2009 07:16:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2009 07:16:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.218.211 as permitted sender) Received: from [209.85.218.211] (HELO mail-bw0-f211.google.com) (209.85.218.211) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2009 07:15:53 +0000 Received: by bwz3 with SMTP id 3so639519bwz.36 for ; Wed, 28 Oct 2009 00:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=Dkoi6Q5XNKJLhTvKsqq8hafun7rGM2SqKMV0mc97d+I=; b=OtQEBIMoULfmykj9QXnaHYfmfDKDA13TG/PJgsvf/gm6baHab8rs+fdQKOMIkfTMb0 P+yR/Nm4Rx1+gDB4i9u1fBAU7y8WJgvT8ULpQSHN9poE7d0NQXv8LyJfJgd1tzuCJabh oXF1DCmbQFGOTLTMdMzyRWCEp4WfWF73DiqL8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=tu+nK/sGfZF4MJhzUr1Q2jV7v5+0Z5/Fl/LFBlftEeExlPmeQJNe2W0qUxnk7gu0vt IBn8ug+jMoao65VrbLcwqZehYuizm8IbpHsdrkCtn5VfjlBJTTZve/8LARyY1cWnWuNz VOVLVuRieo9KDXfj1G8M06UO9pd8+kkhZgPFo= MIME-Version: 1.0 Received: by 10.204.153.3 with SMTP id i3mr444477bkw.26.1256714133149; Wed, 28 Oct 2009 00:15:33 -0700 (PDT) From: Claus Ibsen Date: Wed, 28 Oct 2009 08:15:13 +0100 Message-ID: <5380c69c0910280015w7a1a7b5auf6da4d235c3b8657@mail.gmail.com> Subject: Discussion - Route Policy feature in Camel 2.1 To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi A bit of background is CAMEL-1048 https://issues.apache.org/activemq/browse/CAMEL-1048 I am looking into this how to implement this nicely in Camel. CAMEL-1048 is maybe a bit too much at current requirements from Camel users. What they are looking for is to be able to dynamic throttle consumers. Apache CXF and ServiceMix has such a feature specially build in their JMS components. What it does is that it can stop the JMS listener when there are too many messages in flight. But on the other hand we have also had Camel users wanting to dynamic start/stop consumers depending on some flag of some sort. So there is also grounds to make this a general solution that can cater both use cases. I do wonder how to move forward. In CAMEL-1048 there is an example using requires to associate a route that this predicate must be true for the route to be running. I do not like the naming requires or require. And having it in the fluent builder / DSL makes it fixed. Wonder if we should name such a configuration a RoutePolicy so you can configure it as ... This is quite flexible as we can just offer a SPI interface for the RoutePolicy and have people implement it as how they like it. For example as above something that is controlled by the number of current in flight exchanges. Others can control it by CPU utliization, a switch, timer based etc. In the Java DSL its from("xxx").routePolicy(myRoutePolicy).to(yyyy); -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus