Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The seda: component provides asynchronous SEDA behaviour behavior so that messages are exchanged on a BlockingQueue and consumers are invoked in a separate thread to the producer.

Warning
titleBe aware

Be aware that adding a thread pool to a seda endpoint by doing something like:

Code Block

from("seda:stageName").thread(5).process(...)

can wind up with two BlockQueues. One from seda endpoint and one from the workqueue of the thread pool which may not be what you want. Instead, you might want to consider configuring a

...

Direct endpoint with a thread pool which can process messages both synchronously and asynchronously. For example:

Code Block

from("direct:stageName").thread(5).process(..). 

Note that queues are only visible within a single CamelContext. If you want to communicate across CamelContext instances such as to communicate across web applications, see the VM component.

This component does not implement any kind of persistence or recovery if the VM termininates terminates while messages are yet to be processed. If you need persistence, reliability or distributed SEDA then try using either JMS or ActiveMQ.

Tip
titleSynchronous

The Direct component provides synchronous invocation of any consumers when a producer sends a message exchange.

URI format

Code Block
seda:someName

Where someName can be any string to uniquely identify the endpoint within the current CamelContext

URI Options

Name

Default

Description

size

1000

The maximum size of the SEDA queue

...

Include Page
CAMEL:Endpoint See Also
CAMEL:Endpoint See Also