I am trying send message from int-file:inbound-channel-adapter to int-ftp:outbound-channel-adapter for moving file to remote directory and int-ftp:outbound-gateway to delete file in remote directory.
Now int-file:inbound-channel-adapter polls and sends message to int-ftp:outbound-channel-adapter and when it polls second time sends message to int-ftp:outbound-gateway.
By using int:splitter i am still able to receive single message for single file and only one channel is getting invoke. I want to send every poll message to both channels.
Example follows:
Now working as:
- First time polls sends message to int-ftp:outbound-channel-adapter
- Second time polls sends message to int-ftp:outbound-gateway
- Third time polls sends message to int-ftp:outbound-channel-adapter
- Fourth time polls sends message to int-ftp:outbound-gateway
Want to achieve as:
1.First time polls sends message to int-ftp:outbound-channel-adapter and int-ftp:outbound-gateway 2.Second time polls sends message to int-ftp:outbound-channel-adapter and int-ftp:outbound-gateway
Thanks in advance
<int-file:inbound-channel-adapter id="inErrorINPRm"
channel="errorRm"
directory="in/error"
>
<int:poller fixed-rate="5000" />
</int-file:inbound-channel-adapter>
<int:channel id="errorRm"></int:channel>
<int:channel id="ErrorRmMv"></int:channel>
<int:channel id="ftpINPfromError"></int:channel>
<int:splitter id="splitter" input-channel="errorRm" output-channel="ErrorRmMv"/>
<int-ftp:outbound-channel-adapter id="ftpError"
channel="ErrorRmMv"
session-factory="ClientFactory"
auto-create-directory="true"
remote-directory="in/error"
>
</int-ftp:outbound-channel-adapter>
<int:header-enricher id="header-enricher-error" input-channel="ErrorRmMv" output-channel="ftpINPfromError">
<int:header name="file_remoteDirectory" value="in/working"/>
</int:header-enricher>
<int-ftp:outbound-gateway id="gatewayRmfromError"
session-factory="ClientFactory"
expression="file_remoteDirectory"
request-channel="ftpINPfromError"
command="rm"
>
</int-ftp:outbound-gateway>