Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
Claim CheckThe Claim Check from the EIP patterns allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time. The message content is stored temporarily in a persistent store like a database or file system. This pattern is very useful when message content is very large (thus it would be expensive to send around) and not all components require all information. It can also be useful in situations where you cannot trust the information with an outside party; in this case, you can use the Claim Check to hide the sensitive portions of data.
ExampleIn this example we want to replace a message body with a claim check, and restore the body at a later step. Using the Fluent Builders Using the Spring XML Extensions The example route is pretty simple - its just a Pipeline. In a real application you would have some other steps where the The message is first sent to the This bean stores the message body into the data store, using the The next step in the pipeline is the To add the message body back into the message, we use the This bean queries the data store using the claim check as the key and then adds the data back into the message. The message body is then removed from the data store and finally the claim check is removed. Now the message is back to what we started with! For full details, check the example source here: camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java |