我正在調查spring-projects/spring-integration-samples中的聚合器示例。
https://github.com/spring-projects/spring-integration-samples/blob/master/applications/cafe/cafe-si/src/main/resources/META-INF/spring/integration/cafeDemo-xml.xmlSpring集成示例:: Aggregator
<int:aggregator input-channel="preparedDrinks" method="prepareDelivery" output-channel="deliveries">
<beans:bean class="org.springframework.integration.samples.cafe.xml.Waiter"/>
</int:aggregator>
public class Waiter {
public Delivery prepareDelivery(List<Drink> drinks) {
return new Delivery(drinks);
}
}
服務員類沒有指定任何關係/發佈策略。這些項目是如何彙總/發佈的?根據該IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER
和IntegrationMessageHeaderAccessor.SEQUENCE_SIZE
HeaderAttributeCorrelationStrategy
爲IntegrationMessageHeaderAccessor.CORRELATION_ID
頭和SequenceSizeReleaseStrategy
-