私は、AggregatorとMessageCountReleaseStrategyを使用した簡単な使用例があります。営業終了時には、 というメッセージがメッセージストアに一晩保存されています。残りのメッセージが到着した翌日、グループは解放されます。アグリゲータメッセージを手動で解放する
ここで、終わりに保存されたメッセージ(リリースされていない)を覗き込み、ユーザーが望む場合にメッセージをリリースするオプションを提供したいと考えています。
保存されているメッセージを覗く方法の指針が必要です。 このユースケースを簡単にするため、私は1つのメッセージグループのみを検討しています。
<int:aggregator input-channel="orderItem" output-channel="orders"
ref="orderAggregator" method="createOrders"
expire-groups-upon-completion="true" release-strategy="messageCountReleaseStrategy"
message-store="messageStore" discard-channel="aggregatorDiscard" />
<bean id="messageCountReleaseStrategy" class="org.springframework.integration.aggregator.MessageCountReleaseStrategy">
<constructor-arg index="0" value="10"/>
</bean>