Package org.apache.camel.builder

Examples of org.apache.camel.builder.ThreadPoolProfileBuilder.build()


            @Override
            public void configure() throws Exception {
                // create a profile for the throttler
                ThreadPoolProfileBuilder builder = new ThreadPoolProfileBuilder("myThrottler");
                builder.maxQueueSize(2);
                context.getExecutorServiceManager().registerThreadPoolProfile(builder.build());
               
                from("seda:start")
                    .throttle(1).timePeriodMillis(100)
                        .asyncDelayed().executorServiceRef("myThrottler").callerRunsWhenRejected(true)
                    .to("mock:result");
View Full Code Here


public class ThrottlerAsyncDelayedTest extends CamelTestSupport {
    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        ThreadPoolProfileBuilder builder = new ThreadPoolProfileBuilder("myThrottler");
        builder.maxQueueSize(5);
        context.getExecutorServiceManager().registerThreadPoolProfile(builder.build());

        return new ThrottlerAsyncDelayedRouteBuilder();
    }

    @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.