I am trying to achieve the following in the apache camel route
- Read data from database
- generate files from the data
- send the generated files to SFTP endpoint
- save the generated file to the database.
I want to make transacted for step 3 and 4 so that files which are sent are always stored in the database and vice versa. any suggestions how achieve that?
I have tried using the transacted in the route files which are sent to SFTP endpoint and not reverted even though if it fails in step 4.