Luka Špoljarić
Luka Špoljarić

Reputation: 999

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

Upvotes: 2

Views: 856

Answers (1)

Luka Špoljarić
Luka Špoljarić

Reputation: 999

figured this one out I was looking for this:

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

Upvotes: 3

Related Questions