Hi,
I would like to know how a success or failure can be achieved in the sftp outbound adapter.
Thanks
Hi,
I would like to know how a success or failure can be achieved in the sftp outbound adapter.
Thanks
A number of options, including...
A.
1. Make the channel the adapter subscribe to a <publish-subscribe-channel />
2. Add an order attribute to the adapter (="1")
3. Add another endpoint (e.g. <service-activator/>) as a subscriber to the same channel, with order="2".
The second endpoint will only be called if the sftp operation is successful.
B.
1. Add an error-channel to the flow's inbound endpoint.
2. If the sftp operation fails, an ErrorMessage will be sent to the error-channel. If no ErrorMessag, the operation was successful.
C.
Both A. and B.
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware
Thanks Gary.I will try the second option.
Are there any samples to configure the error channel?
I would appreciate any help.
Thanks
Oleg's SpringOne demo is one...
https://github.com/olegz/s12gx.2011/...egration/error
Here's another... https://github.com/SpringSource/spri...mo-context.xml
Basically, you put an error-channel on the inbound endpoint and it gets an ErrorMessage who's payload is a MessagingException; this has two important properties cause (the exception) and failedMessage (the message that failed).
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware