...
- PollingConsumer
- Scheduled Polling Components
ScheduledPollConsumer Options
The ScheduledPollConsumer supports the following options:
Option | Description |
---|---|
pollStrategy | Camel 2.0: A pluggable |
About error handling and scheduled polling consumers
ScheduledPollConsumer is scheduled based and its run
method is invoked periodically based on schedule settings. But errors can also occur when a poll being executed. For instance if Camel should poll a file network, and this network resource is not available then a java.io.IOException
could occur. As this error happens before any Exchange has been created and prepared for routing, then the regular Error Handlinghandling in Camel does not apply. So what does the consumer do then? Well the exception is propagated back to the run
method where its handled. Camel will by default log the exception at WARN
level and then ignore it. At next schedule the error could have been resolved and thus being able to poll the endpoint successfully.
...
Code Block |
---|
from("file://inbox/?pollStrategy=#myPoll").to("activemq:queue:inbox") |
...
Include Page | ||||
---|---|---|---|---|
|
...