Table of Contents
Enriches messages with data retrieved from a polling consumer
The poll enrich pattern uses a polling consumer to pull data from an endpoint outside of the route and uses the new data to enrich the message being processed by the route. An AggregationStrategy is used to determine how the data is combined.
The poll enrich pattern can be used anywhere in the body of a route.
The Poll Enrich pattern is typically used to poll files from an FTP server.
Table 104, “Poll Enrich Properties” describes the properties you can specify using the properties editor.
Table 104. Poll Enrich Properties
| Name | Description |
|---|---|
| Specifies the expression that computes the endpoint URI to use as a resource endpoint to enrich from. |
| Specifies whether users can control how to handle exceptions thrown during the aggregate method (for example, whether to suppress the exception, set a custom message body, or something else). The default is Disabled, which prevents use of the aggregate method when an exception occurs while attempting to retrieve the data to enrich from the resource. |
| Specifies the maximum size used to cache and reuse the producer when URIs are reused. |
| Specifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel. |
| Specifies a unique identifier for the endpoint. The tooling automatically generates an id for a node when it is created, but you can remove that id or replace it with your own. The Camel debugger requires all nodes with a breakpoint set to have a unique id. You can use the id to refer to endpoints in your Camel XML file. |
| When selected ignores the invalid endpoint exception when that endpoint is used to create a producer. |
| Specifies whether the aggregate method is used when there is no data to
enrich, When disabled, it is not used. When enabled, null values are
used as the |
| Specifies the method name to use when POJOs are used as the AggregationStrategy. |
| Specifies a reference for looking up the AggregationStrategy in the registry. |
| Specifies the time, in milliseconds, the enricher polls for data before timing out. An negative value specifies that the enricher will never timeout. |