Java 路由内的apachecamel多线程

Java 路由内的apachecamel多线程,java,multithreading,spring-camel,Java,Multithreading,Spring Camel,我有以下路线: @Override public void configure() throws Exception { String overviewRoute = this.routingProperties.getReportingRoute(OverviewtRouteConstants.OVERVIEW); this.from(overviewRoute).routeId(overviewRoute).threads(1, 100).choice()

我有以下路线:

    @Override
public void configure() throws Exception {
    String overviewRoute = this.routingProperties.getReportingRoute(OverviewtRouteConstants.OVERVIEW);

    this.from(overviewRoute).routeId(overviewRoute).threads(1, 100).choice()
            .when(this.simple(BODY_GRAPH_NAME + GraphConstants.OVERVIEW_OPEN_LANE + "'"))
            .to(this.routingProperties.getReportingRoute(OVERVIEW_OPENLANES_TO))
            .when(this.simple(BODY_GRAPH_NAME + GraphConstants.OVERVIEW_BELT_DOWNTIME + "'"))
            .to(this.routingProperties.getReportingRoute(OVERVIEW_BELTDOWNTIME_TO))
            .when(this.simple(BODY_GRAPH_NAME + GraphConstants.OVERVIEW_LUGGAGE_THROUGHPUT + "'"))
            .to(this.routingProperties.getReportingRoute(OVERVIEW_LUGGAGETHROUGHPUT_TO))
            .when(this.simple(BODY_GRAPH_NAME + GraphConstants.OVERVIEW_LANE_UTILIZATION + "'"))
            .to(this.routingProperties.getReportingRoute(OVERVIEW_LUGGAGETHROUGHPUT_TO))
            .when(this.simple(BODY_GRAPH_NAME + GraphConstants.OVERVIEW_LUGGAGE_SCANNED + "'"))
            .to(this.routingProperties.getReportingRoute(OVERVIEW_LUGGAGESCANNED_TO));
}
Rest服务端点:

import javax.ws.rs.core.Response;

import org.springframework.stereotype.Service;
@Service(SERVICE_NAME)
public class OverviewServicesImpl extends BaseServices implements OverviewServices {

@Override
public Response overview(OverviewSearchDTO dto) {
    return this.executeRouting(OverviewtRouteConstants.OVERVIEW, dto);
}

}
背景: 从ws-REST端点调用主路由overviewRoute。根据when子句调用其他路由

我的前端并行调用主路线多次

我看到: “choice”子句中定义的所有路由都按顺序调用(上一个路由完成后,将调用下一个路由)

我想要的是: 我希望choice子句中定义的路由必须在ws调用完成后立即调用,而不是在上一次调用完成后调用

我所尝试的: 阿帕奇赛达
Spring-Scope:@Scope(BeanDefinition.Scope\u PROTOTYPE)

听起来像是所有的
。当
子句返回True时,它会遵循所有的选择。我不确定您的
中的部分。当
子句是实际比较时?我是否错过了您在基于上下文的路由器中如何进行比较以检查要比较和路由的消息部分