use of org.apache.camel.impl.ThrottlingExceptionRoutePolicy in project camel by apache.
the class ManagedThrottlingExceptionRoutePolicyTest method createRouteBuilder.
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
ThrottlingExceptionRoutePolicy policy = new ThrottlingExceptionRoutePolicy(10, 1000, 5000, null);
policy.setHalfOpenHandler(new DummyHandler());
return new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start").routeId("testRoute").routePolicy(policy).to("log:foo").process(new BoomProcess()).to("mock:result");
}
};
}
Aggregations