Reputation: 1
<file:outbound-channel-adapter id="processingDirOutputAdapter"
directory=""
delete-source-files="false"
channel="dataFileMoveToArchiveDir"
>
</file:outbound-channel-adapter>
<int-file:inbound-channel-adapter id="inErrorINPRm"
channel="errorRm"
directory="in/error"
>`enter code here`
<int:poller fixed-rate="5000" />
</int-file:inbound-channel-adapter>
<int:channel id="errorRm"/>
<int:publish-subscribe-channel id="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:service-activator id="cleanup"
input-channel="ErrorRmMv"
output-channel="nullChannel"
order="3"
expression="payload.delete('c:local/test/ + payload.name')"/>
Now after the outbound-channel i have to go back to source local folder to delete the local file in order to cleanup the folder
Upvotes: 0
Views: 1354
Reputation: 174554
See the retry-and-more sample for how to apply an advice to the outbound adapter to take action after it has completed.
You don't seem to have applied the changes I suggested in my answer to your other question.
What you have won't work - you have two subscribers on ErrorRmMv
- they will get alternate messages.
Upvotes: 1