Elvio Caruana created CAMEL-7448:
------------------------------------

             Summary: throttle EIP - unchanged value
                 Key: CAMEL-7448
                 URL: https://issues.apache.org/jira/browse/CAMEL-7448
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.13.1
            Reporter: Elvio Caruana
            Priority: Minor


Throttler 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:
            .throttle(header("throttleHeader"))

however if the above evaluates to null (header missing from message) the 
Throttler throws an exception (Throttler.java:108).

The workaround is to ensure that all messages carry the value (if the value is 
the same no changes will take affect). Adding an option to turn this on and off 
(e.g. allowNullException) would make it much easier to use (as per camel-users 
thread [2]).

[1] http://camel.apache.org/throttler.html
[2] 
http://camel.465427.n5.nabble.com/throttle-EIP-unchanged-value-td5751300.html




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to