I'm fairly new to Spring Integration and I'm trying to setup a simple use case:
polling a remote REST endpoint, split the returned payload into multiple lines and send it to a Kafka outbound adapter. I successfully did something analogous, which uses a File Adapter, but I'm stuck with the HTTP adapter. I don't understand how to associate a poller to a HTTP inbound adapter.
So far, my approach has been to create a simple flow:
return IntegrationFlows
.from
(
Http.inboundChannelAdapter("http://localhost:8080/data")
.requestMapping(m -> m.methods(HttpMethod.GET))
.replyTimeout(20)
)
.channel(INBOUND_DEMO_CHANNEL)
.get();
The inboundChannelAdapter
doesn't seem to accept a Poller
. In my previous attempt using a File, I have created a FileReadingMessageSource
so that my flow looked like:
return IntegrationFlows.from(fileReadingMessageSource,
// POLLER CONFIGURATION
.poller(Pollers.fixedDelay(period)
...
.get();
but I can't find the equivalent of a HTTP message source.