camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Cali <>
Subject Throtteling and dynamically changing MaxRequestsPerPeriod via Bean
Date Fri, 17 Apr 2015 13:02:59 GMT
I would like to change the MaxRequestsPerPeriod inside a Throttler.

I would like to use spring and having such a simple route, with some beans.
    <bean id="hello" class="example.HelloImpl"/>
    <bean id="endMe" class="example.EndMe" />
    <bean id="configurationSource" class="example.ConfigurationSource" />

    <camelContext xmlns="">
            <from uri="direct:start"/>
            <throttle timePeriodMillis="1000">
                <method ref="configurationSource"
                <to uri="endMe"/>

But I cant get it to work, I will always get an error:
java.lang.IllegalArgumentException: MaxRequestsPerPeriod expression must be
provided on Throttle[bean{configurationSource, method=getMessagesPerSecond}
request per 1000 millis -> [To[endMe]]]

<constant>3</constant> instead of the method expression works.

Did I misunderstood the concept of expressions?


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message