camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a106562 <>
Subject moving input message after routing ends
Date Fri, 21 Mar 2014 20:05:21 GMT
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 


I wonder, if there are any better ways, patterns to implement the algorithm

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message