Because exchange properties in camel are not scoped to a particular route but rathe r to the exchange, it is possible to have obscure bug due to the following issues that can arise,
- Routes can be called with old exchange property values from a previous invocation if they are called multiple times during execution of a single exchange
- It is possible for downstream routes to overwrite previously set exchange property values
- To address issue 1, in general 'parameter' values should be passed to routes via the body as a map instead of exchange properties and routes should return values by setting them on the body, so calling routes should always set the arguments on the body and this would guarantee that the invoked route always gets the correct 'parameter' values.
- To address issue 2, exchange properties should be prefixed with route ids or a timestamp to guarantee uniqueness within the context of an exchange.
- Historically openmrs-eip has a standard exchange properties named event, retry-item, retry-item-id, we need to document event property name and ask API users not to re-use it in their custom routes. retry-item and retry-item-id need to be prefixed with route ids or something else to guarantee uniqueness