...
- 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.
Message Store Data
In order to disambiguate stored exchanges and make them retrievable again, message store entries must carry attributes in addition to the marshaled exchange.
Item | Description/Reason |
---|---|
ID | Generated unique ID of the entry |
Exchange | exchange (or parts thereof), usually in some marshalled form (except in-memory stores) |
CamelContext | A message store may be used by several CamelContext instances |
Correlation | Correlation ID to be able to aggregate related exchanges |
Source | Identifier that uniquely describes the point in the route from which an exchange was stored. E.g. there might be more than one aggregator processor in a route. Could also be used to manually or automatically refeed exchanges back into the route |
Status | Status of an exchange (e.g. PROCESSING, DONE, FAILED) |
CreationTime | Timestamp when the entry was created |
ExpirationTime | Timestamp when the entry can be considered as expired and picked up by some cleaning process |
... | ... more? |
Code examples
Note | ||
---|---|---|
| ||
Sometimes it is easier to express thoughts by providing a fictional piece of code along with some comments.... |
This section intends to demonstrate the usage of a Message Store by providing hypotethical hypothetical code snippets, e.g.
Code Block | ||
---|---|---|
| ||
... from(...) .aggregate() .correlationExpression(header(id)) .aggregationStrategy(myStrategy) .completionTimeout(10000) .messageStore(myStore) ... |
...