I am using Spring cloud stream to read a file and split using file splitter and emit each line as a message using DSL style, the file am reading has a header row, just wondering if there is an easy way to skip the header row before/after reading.
Any help is appreciated.
here is how my splitter and integrationFlow looks like:
enter code here
return IntegrationFlows
.from("....")
.split(Files.splitter(true, true)/
.charset(StandardCharsets.UTF_8)
.applySequence(true), //emmit sequenceNumber to header
e -> e.id("fileSplitter")
);
enter code here
IntegrationFlow integrationFlow = integrationFlowBuilder
.<Object, Class<?>>route(Object::getClass, m -> m
.channelMapping(FileSplitter.FileMarker.class, "markers.input")
.channelMapping(String.class, "lines.input"))
.get();