我有这些路线:
@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));
}
休息服务端点:
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 端点调用的。其他路由根据when子句调用。
我的前端并行多次调用主路由。
我所看到的:“选择”子句中定义的所有路由都是按顺序调用的(一旦前一个路由完成,就会调用下一个路由)。
我想要什么:我希望一旦调用了 ws 就必须调用在选择子句中定义的路由,而不是在前一次调用完成后调用。
我尝试过:Apache seda Spring Scope:@Scope(BeanDefinition.SCOPE_PROTOTYPE)