...
The EventDrivePollingConsumer (the default implementation) supports the following options:
Div |
---|
class | confluenceTableSmall |
---|
|
Option | Default | Description |
---|
pollingConsumerQueueSize | 1000 | Camel |
|
Wiki Markup |
---|
{div:class=confluenceTableSmall}
|| Option || Default || Description ||
| {{pollingConsumerQueueSize}} | {{1000}} | *Camel * |
| {{pollingConsumerBlockWhenFull}} | {{true}} | *Camel | pollingConsumerBlockWhenFull | true | Camel 2.14/2.13.1/2.12/4: |
* |
{div} |
Notice that some Camel Components has their own implementation of PollingConsumer
and therefore do not support the options above.
...
The ScheduledPollConsumer supports the following options:
Div |
---|
class | confluenceTableSmall |
---|
|
Wiki Markup |
---|
{div:class=confluenceTableSmall}
|| Option || Default || Description ||
| {{pollStrategy}} | - | A pluggable {{ Option | Default | Description |
---|
pollStrategy | | A pluggable |
org.apache.camel.PollingConsumerPollingStrategy
|
}} {{}} ** [] {{}} |
| {{sendEmptyMessageWhenIdle}} | {{false}} | *Camel | sendEmptyMessageWhenIdle | false | Camel 2.9: |
* |
| {{startScheduler}} | {{true}} | Whether the scheduler should be auto started. |
| {{initialDelay}} | {{1000}} | Milliseconds before the first poll starts. |
| {{delay}} | {{500}} | Milliseconds before the next poll. |
| {{useFixedDelay}} | | Controls if fixed delay or fixed rate is used. See [ScheduledExecutorService|http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html] in JDK for details. In *Camel 2.7.x* or older the default value is {{false}}. From *Camel 2.8* onwards the default value is {{true}}. |
| {{timeUnit}} | {{TimeUnit.MILLISECONDS}} | time unit for {{initialDelay}} and {{delay}} options. |
| {{runLoggingLevel}} | {{TRACE}} | *Camel 2.8:* The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. |
| {{scheduledExecutorService}} | {{null}} | *Camel 2.10:* Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. This option allows you to share a thread pool among multiple consumers. |
| {{greedy}} | {{false}} | *Camel | startScheduler | true | Whether the scheduler should be auto started. | initialDelay | 1000 | Milliseconds before the first poll starts. | delay | 500 | Milliseconds before the next poll. | useFixedDelay | | Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. In Camel 2.7.x or older the default value is false . From Camel 2.8 onwards the default value is true . | timeUnit | TimeUnit.MILLISECONDS | time unit for initialDelay and delay options. | runLoggingLevel | TRACE | Camel 2.8: The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. | scheduledExecutorService | null | Camel 2.10: Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. This option allows you to share a thread pool among multiple consumers. | greedy | false | Camel 2.10.6/2.11.1: |
* |
| {{scheduler}} | {{null}} | *Camel | scheduler | null | Camel 2.12: |
* {{org.apache.camel.spi.ScheduledPollConsumerScheduler
|
}} {{}} [] [] ** {{}} {{}} {{}} {{}} text {{quartz2}} to refer to use the [Quartz2] scheduler; and use the text {{spring}} to use the [Spring] based; and use the text {{#myScheduler}} to refer to a custom scheduler by its id in the [Registry]. See [Quartz2] page for an example. |
| {{scheduler.xxx}} | {{null}} | *Camel 2.12:* To configure additional properties when using a custom {{scheduler}} or any of the [Quartz2], [Spring] based scheduler. |
| {{backoffMultiplier}} | {{0}} | *Camel 2.12:* To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then {{backoffIdleThreshold}} and/or {{backoffErrorThreshold}} must also be configured. |
| {{backoffIdleThreshold}} | {{0}} | *Camel 2.12:* The number of subsequent idle polls that should happen before the {{backoffMultipler}} should kick-in. |
| {{backoffErrorThreshold}} | {{0}} | *Camel 2.12:* The number of subsequent error polls (failed due some error) that should happen before the {{backoffMultipler}} should kick-in. |
{div}text quartz2 to refer to use the Quartz2 scheduler; and use the text spring to use the Spring based; and use the text #myScheduler to refer to a custom scheduler by its id in the Registry. See Quartz2 page for an example. | scheduler.xxx | null | Camel 2.12: To configure additional properties when using a custom scheduler or any of the Quartz2, Spring based scheduler. | backoffMultiplier | 0 | Camel 2.12: To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. | backoffIdleThreshold | 0 | Camel 2.12: The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. | backoffErrorThreshold | 0 | Camel 2.12: The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. |
|
Using backoff to let the scheduler be less aggressive
...