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 88B0811FE2 for ; Mon, 19 May 2014 17:27:10 +0000 (UTC) Received: (qmail 39342 invoked by uid 500); 19 May 2014 17:27:10 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 39288 invoked by uid 500); 19 May 2014 17:27:10 -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 39280 invoked by uid 99); 19 May 2014 17:27:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 May 2014 17:27:10 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.174 as permitted sender) Received: from [209.85.223.174] (HELO mail-ie0-f174.google.com) (209.85.223.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 May 2014 17:27:08 +0000 Received: by mail-ie0-f174.google.com with SMTP id lx4so2650984iec.33 for ; Mon, 19 May 2014 10:26:44 -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=89QYyNWryJsu/ryo3m87HO159XFEC7nPc0jEhWhkXRI=; b=nkSEN3kqQ/TE+ewz32orXUBnrsTyweuHbEZrsnIy2q0Sa2Fak7nDHSwxzwMuJhm2ws IgwbYBGmaqlIODxkObdSDW7c6eAJrSR0wTPIHuc2Xb3K25aV9xu4XSESN+8UdP09botu enaTU4HyMvQ1tzirocAcOOy6s5W2e1jHUQEZWYr/9MzHcMR7PN/32PNlBXIcGwqLHCHN OUo6/7S5BdD4h6hEPLC8m7fT3SJpYuLK+VCrg/oNzJj34Y8s8TBGwmwXOaezpcIAKhaJ OlYm1LGGR4t3Ptgd951rEjWFePyy6uQTNSEY7dDrKUNKUfCNpP3VFUQvr6weYeLztIyO M1yw== X-Received: by 10.50.79.161 with SMTP id k1mr19207007igx.31.1400520404229; Mon, 19 May 2014 10:26:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.93.67 with HTTP; Mon, 19 May 2014 10:26:24 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Mon, 19 May 2014 19:26:24 +0200 Message-ID: Subject: Re: throttle EIP - unchanged value To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi Yeah the doc is wrong - Camel has changed the throttler to allow any kind of exceptions, so if that eval to null it throws an exception. So we could likely add a new option you can turn on if that is okay - allowNullException or something like that - find a good name is sometime hard. Fell free to log a JIRA On Mon, May 19, 2014 at 7:22 PM, Elvio Caruana (ecaruana) wrote: > Hit the send button too quickly... > > The problem I'm seeing is that if the header "throttleHeader" is null for some messages, an exception is being thrown. I was expecting it to just use the old value for the throttling calculation. > > > Elvio > > -----Original Message----- > From: Elvio Caruana (ecaruana) > Sent: 19 May 2014 18:09 > To: users@camel.apache.org > Subject: throttle EIP - unchanged value > > Hi all, > > I've either misunderstood the throttler documentation or there is a possible discrepancy in the throttle documentation (I'm using Camel 2.13.1). > > Using the Java DSL: > .throttle(header("throttleHeader")) > > Documentation [1] states "If the header is absent, then the Throttler uses the old value. So that allows you to only provide a header if the value is to be changed" however > Throttler.java:108 throws an exception if the expression evaluates to null. > > > Thanks, > Elvio > > [1] http://camel.apache.org/throttler.html -- Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/