Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
titleClaim Check EIP store

// Optionally: override default store from context
// (ohr:) IMHO I don't think that this configuration level is really necessary
defaultMessageStore(myStore);

// 1) Store body.
// 2) Set body to null.
// 3) Set Exchange.CLAIM_CHECK header to unique claim id.
from(...)
   .claimCheckcheckIn()  // store body in default store
   // .claimCheckcheckIn(header('bigHeader'), customStore) : store header in custom store 
   .to(...);
Code Block
titleClaim Check EIP read
// 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 
   .claimreclaim() // read body from default store
   // .transformreclaim(claim).aggregationStrategy(myStrategy)) : more generically using asa aggregation expressionstrategy
   // .setHeader('bigHeader', claim(reclaim(customStore).aggregationStrategy(myStrategy) : retrievereclaim from custom store backusing intoa originalaggregation headerstrategy
   .to(...);

Open issues:

  • exception handling if there's no data available for a specific token
  • clean up of stale content that was never claimed back
  • maybe return some kind of DataHandler instead of a token (cf. CXF MTOM attachments) and retrieve content transparently?