user6248190
user6248190

Reputation: 1269

How to change rejectExecution value to True in Camel

I was looking into the Throttler in Apache Camel, reading on http://camel.apache.org/throttler.html it says the rejectExecution value is by default set to false.

My question is how do I change this value to true?

for instance in the route below, where would I change the default value?

from("direct:start")
 .throttle(5).timePeriodMillis(2000)
 .to("mock:throttled")
 .end()
.to("mock:after")

Upvotes: 0

Views: 236

Answers (1)

Claus Ibsen
Claus Ibsen

Reputation: 55550

Just use your Java editor, and press control + space to get a list of possible methods, and you can find it

from("direct:start")
 .throttle(5).timePeriodMillis(2000).rejectExecution(true)
 .to("mock:throttled")
 .end()
.to("mock:after")

Upvotes: 1

Related Questions