camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elvio Caruana (ecaruana)" <ecaru...@cisco.com>
Subject RE: throttle EIP - unchanged value
Date Mon, 19 May 2014 17:22:59 GMT
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

Mime
View raw message