In this flow the HTTP inbound is configured with request-response. But I still dont get the response as it is routed to the File outbound. How do I get a response for the HTTP endpoint and also route the response to File outbound.
<flow name="helloFlow1" doc:name="helloFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="9095" doc:name="HTTP"/>
<custom-transformer class="com.uk.MyTransformer" doc:name="Java"/>
<component class="com.uk.MyComponent" doc:name="Java"/>
<echo-component doc:name="Echo"/>
<file:outbound-endpoint path="C:\" outputPattern="file#[function:datestamp]" doc:name="File"/>
You don’t receive a response because nothing creates one: the file:outbound-endpoint is one-way per nature and doesn’t generate a response event.
Assuming you want the same content written to the file to be also returned to the caller of the HTTP endpoint, one option consists in “detaching” the writing to the file in a parallel async flow so the main flow returns its current value to the caller: