【发布时间】:2018-06-15 13:55:39
【问题描述】:
是否可以让发送者等到任务执行器队列/线程空闲。
任务执行者如下:
<int:channel id="inputRequestChannel">
<int:dispatcher task-executor="validationWorkers"/>
</int:channel>
<task:executor id="validationWorkers" pool-size="5" queue-capacity="10" rejection-policy="CALLER_RUNS"/>
使用上述配置会丢失一些数据包,这些数据包会发送到 inputRequestChannel。
如何保证不丢包?
哪种拒绝政策合适?
【问题讨论】:
-
>How to ensure that the no packets are lost?那是不可能的;一旦它们在执行者的队列中,如果服务器崩溃,它们就会丢失。您需要显示其余配置,以便有人提出有关避免消息丢失的建议。