Hello community, I have the following algorithm
1. Incoming message. 2. Fetch an object from db or remote service, which should be updated with information from parsed message. Parsing may be complex a) if the object is not available, then create an new one and save it into db. Notify user about new object. Move Message into .errors folder. Stop Processing message. b) if the object is available, then update it and save. If some properties are invalid stop processing. Move Message into .errors folder. 3. Fetch or create another object which should be processed with similar logic like in step 2. But using remote web service 4. if one of steps fails with an Exception, then move original message into .errors folder, otherwise copy into backup folder and .done folder To be able to move/copy the input message from step 1, I've saved it into properties. Then, for moving message at the end of each 'if' branch, I do setBody(property("input")).to("file:afolder") I wonder, if there are any better ways, patterns to implement the algorithm -- View this message in context: http://camel.465427.n5.nabble.com/moving-input-message-after-routing-ends-tp5749216.html Sent from the Camel - Users mailing list archive at Nabble.com.