Seda — provides an asynchronous connection to any consumer in the
same camelContext element
Seda endpoints provide asynchronous SEDA behavior, so that messages are exchanged on a BlockingQueue and consumers are invoked in a separate thread from the producer.
Queues are only visible within a single
camelContext element. If you want to communicate across
camelContext elements, use a
vm endpoint.
![]() | Note |
|---|---|
Direct endpoints provide synchronous invocation of any consumers when a producer sends a message exchange. |
Example 11, “Seda URI format” shows the syntax for a Seda endpoint URI.
queueName can be any string that uniquely identifies the
endpoint within the current camelContext elements.
![]() | Note |
|---|---|
When matching consumer endpoints to producer endpoints, only the
|
Table 29, “Seda component options” describes the Seda component's options.
Table 29. Seda component options
| Name | Default | Description |
|---|---|---|
size | Unbounded | Specifies the maximum size of the SEDA queue. |
concurrentConsumers | 1 | Specifies the number of concurrent threads processing exchanges. |
waitForTaskToComplete | IfReplyExpected | Specify whether the caller should wait for the task to complete before continuing.
Valid settings are Always, Never or
IfReplyExpected. IfReplyExpected specifies that
the caller will only wait if the message exchange pattern is request/reply. |
timeout | 30000 | Specifies the maximum amount of time, in milliseconds, that a producer will wait for a task to complete before timing out. |
multipleConsumers | false | Specifies whether multiple consumers are allowed or not. If enabled, multiple consumers can receive messages from a SEDA queue. |
limitConcurrentConsumers | true | Specifies whether to limit the number of concurrent consumers to a maximum of
500. If true setting concurrentConsumers to a
number greater than 500 causes an exception to be thrown. |