我正在使用spring集成聚合器和MessageGroupStoreReaper,但不知何故错误没有到达全局errorChannel。
<int:aggregator id="agg"
ref="MyMsgsAggregator"
input-channel="myAggInputChannel"
output-channel="processInputChannel"
discard-channel="errorChannel"
method="aggMessages"
message-store="messageGroupStore"
send-partial-result-on-expiry="true"
expire-groups-upon-completion="true" />
<bean id="messageGroupStore" class="org.springframework.integration.store.SimpleMessageStore" />
<task:scheduled-tasks>
<task:scheduled ref="multipartAggregatorReaper" method="run" fixed-rate="5000" />
</task:scheduled-tasks>
如果在“processInputChannel”后有任何异常(例如到期时的部分结果),那么异常不会到达全局“errorChannel”。
即使我尝试用轮询器将任务计划的工作替换为入站通道适配器(如@Gary所建议的那样),但它仍然不起作用:
<int:inbound-channel-adapter channel="reaperChannel" ref="MyMsgsAggregator" method="triggerReaper">
<int:poller error-channel="**errorChannel**" fixed-rate="5000">
</int:poller>
</int:inbound-channel-adapter>
请建议
谢谢