与批处理一起使用时,作业完成后可以 spring 集成轮询消息吗?

can spring integration poll message after job is done when use with batch?

目前轮询触发器只能是基于时间的,但我需要的是在作业完成时批量,集成开始下一次轮询。这可能吗?

参见Conditional Pollers for Message Sources

或者,使用 PollSkipAdvice.

AOP advice classes can be applied to pollers, in an advice-chain, such as a transaction advice to start a transaction. Starting with version 4.1, a PollSkipAdvice is provided. Pollers use triggers to determine the time of the next poll. The PollSkipAdvice can be used to suppress (skip) a poll, perhaps because there is some downstream condition that would prevent the message being processed. To use this advice, you have to provide it with an implementation of a PollSkipStrategy. Starting with version 4.2.5, a SimplePollSkipStrategy is provided. To use it, you can add an instance as a bean to the application context, inject it into a PollSkipAdvice, and add that to the poller’s advice chain. To skip polling, call skipPolls(). To resume polling, call reset(). Version 4.2 added more flexibility in this area. See Conditional Pollers for Message Sources.