Camel comes with two flavors of content enricher in the DSL
enrich uses a
Producer to obtain the additional data. It is
usually used for Request Reply messaging, for instance to invoke an
external web service.
pollEnrich on the other hand uses a Polling Consumer to
obtain the additional data. It is usually used for Event Message
messaging, for instance to read a file.
pollEnrich does not access any data from
the current Exchange which
means when polling it cannot use any of the existing headers you may have set on the Exchange. For example you
cannot set a filename in the
Exchange.FILE_NAME header and use
pollEnrich to consume only that file. For that you must set the filename in the endpoint URI.