protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
// create shared pool and enlist in registry
pool = new ThreadPoolBuilder(context).poolSize(1).buildScheduled(this, "MySharedPool");
registry.put("myPool", pool);
from("file:target/a?scheduledExecutorService=#myPool").routeId("a")
.to("direct:shared");