generated from camel.apache.org/component
2
Home
gitea_admin edited this page 2026-03-11 14:37:24 +00:00
Table of Contents
Disruptor
Provides asynchronous SEDA behavior using LMAX Disruptor.
Metadata
| Property | Value |
|---|---|
| Scheme | disruptor |
| Support Level | Stable |
| Labels | messaging |
| Version | 4.10.2 |
Maven Dependency
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-disruptor</artifactId>
<version>4.10.2</version>
</dependency>
Endpoint Properties
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name |
string | ✓ | Name of queue | |
size |
integer | 1024 |
The maximum capacity of the Disruptors ringbuffer Will be effectively increased to the nearest power of two. Notice: Mind if you use this option, then it's the first endpoint being created with the queue name that determines the size. To make sure all endpoints use the same size, then configure the size option on all of them, or the first endpoint being created. | |
concurrentConsumers |
integer | 1 |
Number of concurrent threads processing exchanges. | |
multipleConsumers |
boolean | false |
Specifies whether multiple consumers are allowed. If enabled, you can use Disruptor for Publish-Subscribe messaging. That is, you can send a message to the queue and have each consumer receive a copy of the message. When enabled, this option should be specified on every consumer endpoint. | |
waitStrategy |
object | Blocking |
Defines the strategy used by consumer threads to wait on new exchanges to be published. The options allowed are:Blocking, Sleeping, BusySpin and Yielding. | |
bridgeErrorHandler |
boolean | false |
Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | |
exceptionHandler |
object | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | ||
exchangePattern |
object | Sets the exchange pattern when the consumer creates an exchange. | ||
blockWhenFull |
boolean | false |
Whether a thread that sends messages to a full Disruptor will block until the ringbuffer's capacity is no longer exhausted. By default, the calling thread will block and wait until the message can be accepted. By disabling this option, an exception will be thrown stating that the queue is full. | |
producerType |
object | Multi |
Defines the producers allowed on the Disruptor. The options allowed are: Multi to allow multiple producers and Single to enable certain optimizations only allowed when one concurrent producer (on one thread or otherwise synchronized) is active. | |
timeout |
duration | 30000 |
Timeout (in milliseconds) before a producer will stop waiting for an asynchronous task to complete. You can disable timeout by using 0 or a negative value. | |
waitForTaskToComplete |
object | IfReplyExpected |
Option to specify whether the caller should wait for the async task to complete or not before continuing. The following three options are supported: Always, Never or IfReplyExpected. The first two values are self-explanatory. The last value, IfReplyExpected, will only wait if the message is Request Reply based. | |
lazyStartProducer |
boolean | false |
Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. |