问题描述
样本聚合器:
<int:aggregator
input-channel="msgInput"
output-channel="msgOutput"
expire-groups-upon-completion="true"
group-timeout="1000"
expire-groups-upon-timeout="true"
send-partial-result-on-expiry="false"
ref="msgGroup"
/>
序列大小为 2 时,当我手动迭代以 msgGroup 分组的每个消息的时间戳时,仍然有一些(不是全部)消息的差异超过 1000 毫秒.有什么我错过的吗?
With sequence size of 2, when I manually iterate the timestamp of each messages grouped with msgGroup, there are still some (not all) messages that is more than 1000ms difference. Is there anything that I missed perhaps?
请注意,相关 ID 和序列号是根据有效负载以编程方式设置的.因此,某些消息可能具有与序列号相同的相关 ID.
推荐答案
我建议您打开调试日志并按照消息流进行操作.
I suggest you turn on debug logging and follow the message flows.
我不确定您所说的手动迭代时间戳"是什么意思.组超时与消息时间戳无关;它基于消息到达时间(即最后一次组更新时间).
I am not sure what you mean by "manually iterate the timestamp". Group timeout has nothing to do with message timestamps; it's based on message arrival time (i.e. last group update time).
这篇关于组超时在 Spring Aggregator 中无法按预期工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!