Disruptor

Disruptor

Scheme: disruptor

An implementation of the Disruptor component for asynchronous SEDA exchanges on an LMAX Disruptor within a CamelContext

Name Kind Type Required Deprecated Default Value Enum Values Description
name path java.lang.String true false Name of queue
concurrentConsumers parameter int false 1 Number of concurrent threads processing exchanges.
multipleConsumers parameter 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.
waitForTaskToComplete parameter org.apache.camel.WaitForTaskToComplete false IfReplyExpected Never
IfReplyExpected
Always
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.
timeout parameter long false 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.
blockWhenFull parameter 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.
waitStrategy parameter org.apache.camel.component.disruptor.DisruptorWaitStrategy false Blocking Blocking
Sleeping
BusySpin
Yielding
Defines the strategy used by consumer threads to wait on new exchanges to be published. The options allowed are:Blocking, Sleeping, BusySpin and Yielding.
producerType parameter org.apache.camel.component.disruptor.DisruptorProducerType false Multi Single
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.
exchangePattern parameter org.apache.camel.ExchangePattern false InOnly InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the default exchange pattern when creating an exchange
synchronous parameter boolean false false Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).

disruptor consumer

A Consumer for the Disruptor component.