Im working with Spring Integration and am working with files. I'm using the provided DSL to process my files. At the end of my integration flow I am outputting the result to a new file using Files.outboundGateway(...)
. However I keep getting the following error no output-channel or replyChannel header available
. According to the post at the bottom of this post the solution is to set the expected reply to false but, how do I do that with the DSL?
Below shows what I'm doing in the last part of my integration flow to write to a file.
.handle(Files.outboundGateway(new File(outputFilePath))
.autoCreateDirectory(true)
.fileExistsMode(FileExistsMode.APPEND)
.appendNewLine(true)
.fileNameGenerator(m -> m.getHeaders().getOrDefault("file_name", "outputFile") + "_out.txt")
)
.get();
Spring Integration error "no output-channel or replyChannel header available"