An outbound channel adapter is the endpoint where an integration flow hands its final message to an application or external system. Unlike a gateway, it sends the message onward without producing a reply message. section 10.2.8
A typical outbound file flow works like this:
- A gateway publishes a message to textInChannel. section 10.1.1
- A transformer converts the payload to uppercase and publishes it to the next channel. section 10.1.1
- The outbound channel adapter receives the message and writes its payload to a file, using the file_name header for the filename. section 10.1.1
- An existing file can be appended to with a newline instead of overwritten. section 10.1.1
Spring Integration can define the same outbound flow with XML, Java configuration, or the Java DSL. The DSL represents the flow as one bean: receive from a channel, transform the payload, handle it with Files.outboundAdapter(), and call get() to build the IntegrationFlow. section 10.1.3
Writing transformed messages to a directory
A DSL flow can read from textInChannel, uppercase each String, and hand the result to a file adapter configured for /tmp/sia6/files. Setting APPEND and appendNewLine(true) preserves existing content while separating appended messages. section 10.1.3
