THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Generically, entries in a Message Store can be created, updated, read and deleted.
- Ability to temporarily store exchanges for the following EIPs:
- Aggregator, Multicast, RecipientList, Splitter : alternative to AggregationRepository, making it eventually obsolete
- Streaming Resequencer (CAMEL-949)
- Stream Caching
- Claim check
- Ability to store exchanges for a defined period of time
- Idempotent Consumer
- Dead Letter Queue (CAMEL-4575)
- Destination for the Tracer
- Ability to permanently store exchanges (e.g. for audit trails)
- Provide a certain level of manual retry. That is to get the original message from the store and feed it back in the originating route.
- Flexibility to specify what part of an exchange should be stored (e.g. what exchange properties and message headers) and in which format (e.g. object serialization, JSON, using encryption)
- Possibility to provide a filter condition to determine which exchanges should be stored (e.g. only failed exchanges, only with a certain message header)
- Polling Consumer to randomly access a message store
- Producer to write an exchange into a message store
- There is a default message store defined for the Camel Context. This can be overridden by a route-specific message store. This again can be overridden by a specific EIP processor.
Code examples
Note | ||
---|---|---|
| ||
Sometimes it is easier to express thoughts by providing a fictional piece of code along with some comments.... |
...
Code Block | ||
---|---|---|
| ||
// 1) Store body. // 2) Set body to null. // 3) Set Exchange.CLAIM_CHECK header to unique claim id. from(...) .claimCheck() // store body in default store // .claimCheck(header('bigHeader'), customStore) : store header in custom store .to(...); |
Code Block | ||
---|---|---|
| ||
// 1) Lookup for the Exchange.CLAIM_CHECK header value. // 2) Read the message. // 3) Set body to the value fetched from the store. from(...) // .setHeader(Exchange.CLAIM_CHECK, const("id")) : header should still contain the claim id .claim() // read body from default store // .transform(claim()) : more generically as expression // .setHeader('bigHeader', claim(customStore)) : retrieve from custom store back into original header .to(...); |