Group Timeout does not work as expected in Spring Aggregator

丶灬走出姿态 提交于 2019-12-11 09:58:11

问题


Sample aggregator:

<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" 
/>

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?

Please note that the correlation ID and sequence number is set programmatically based on the payload. Hence, some messages could have same correlationID with sequence number.


回答1:


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).



来源:https://stackoverflow.com/questions/30421220/group-timeout-does-not-work-as-expected-in-spring-aggregator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!