Spring Integration DSL,从消息通道轮询

问题描述 投票:2回答:1

我有一个服务,将数据发送到消息通道。我想知道如何指定每隔X秒从该消息通道轮询的集成流并读取到目前为止尚未读取的所有数据。我正在努力实现这样的目标:

IntegrationFlows.from("inputChannel")
    //.poll(Poller.fixedDelay(3, TimeUnit.SECONDS)))
    .handle(myGenericHandlerImpl)
    .get()
java spring spring-boot spring-integration spring-integration-dsl
1个回答
3
投票

想出这个,我正在寻找这个:

IntegrationFlows.from("inputChannel")
    .handle(myGenericHandlerImpl, e -> e.poller(Pollers.fixedDelay(3, TimeUnit.SECONDS)))
    .get()
© www.soinside.com 2019 - 2024. All rights reserved.