简体   繁体   中英

Spring Integration DSL, poll from message channel

I have an service that sends data to an message channel. I'm wondering how can I specify integration flow to poll from that message channel every X seconds and read all the data that hasn't been read so far. I'm trying to achieve something like this:

IntegrationFlows.from("inputChannel")
    //.poll(Poller.fixedDelay(3, TimeUnit.SECONDS)))
    .handle(myGenericHandlerImpl)
    .get()

figured this one out I was looking for this:

IntegrationFlows.from("inputChannel")
    .handle(myGenericHandlerImpl, e -> e.poller(Pollers.fixedDelay(3, TimeUnit.SECONDS)))
    .get()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM