...
There are many examples where our messages must be enriched with data derived from other systems.
...
Content Enrichment Support
There exist several manners to enrich content:
Message translator with arbitrary processor in the routing logic
The
enrich()
method, this method will obtain additional data from the external resource by sending a copy of the current exchange to a producer endpoint and then using the data in the resulting reply. The exchange created by the enricher is always an InOut exchange.The
pollEnrich()
method, this method will obtain additional data by polling a consumer endpoint for additional information. Thus, the implication is that the consumer endpoint (main route) and the consumer endpoint inpollEnrich()
operation are coupled. Therefore, an incoming message on the initial consumer in the route triggers thepollEnrich()
method on the consumer to be polled.