# cSEDA

Produces and consumes messages asynchronously in different threads within a single CamelContext.

cSEDA provides asynchronous SEDA behavior, so that messages are exchanged on a BlockingQueue and consumers are invoked in a separate thread from the producer within a single CamelContext.

For more information, see the Apache camel documentation https://camel.apache.org/components/latest/.

## cSEDA Standard properties

These properties are used to configure cSEDA running in the Standard Job framework.

The Standard cSEDA component belongs to the Core family.

## Basic settings

| Properties | Description |
| --- | --- |
| When using as a start component<br>in a Route: |  |
| Name | Type in any string that uniquely identifies the endpoint. |
| Specify maximum capacity size | Select this check box to set the maximum number of<br>messages that the SEDA queue can hold. Specify the number in the<br>Size field. |
| Concurrent<br>consumers | Specify the number of concurrent threads processing exchanges. |
| Wait for task to<br>complete | Specify whether the caller should wait for the asynchronous task<br>to complete or not before continuing. Select from Always, Never or IfReplyExpected. The default option is IfReplyExpected which means the caller<br>will only wait if the message is Request-Reply based. For more<br>information about this option, see the site http://camel.apache.org/async.html. |
| Timeout | Specify the time in milliseconds before a SEDA producer<br>will stop waiting for an asynchronous task to complete. You can disable<br>this option by using 0 or a negative value. |
| Use multiple<br>consumers | Specifies whether multiple consumers are allowed. If<br>enabled, you can use cSEDA for<br>Publish-Subscribe messaging, which means you can send a message to the<br>SEDA queue and have each consumer receive a copy of the message. When<br>enabled, this option should be specified on every consumer endpoint. |
| Limit concurrent<br>consumers | Whether to limit the number of concurrent consumers to<br>the maximum of 500. By default, an exception will be thrown if a SEDA<br>endpoint is configured with a greater number. |
| Block when<br>full | Whether a thread that sends messages to a full SEDA<br>queue will block until the queue's capacity is no longer exhausted. By<br>default, an exception will be thrown stating that the queue is full. By<br>enabling this option, the calling thread will block instead and wait<br>until the message can be accepted. |
| Poll timeout | Specify the timeout in milliseconds used when polling.<br>When a timeout occurs, the consumer can check whether it is allowed to<br>continue running. Setting a low value allows the consumer to react more<br>quickly upon shutdown. |
| When using as a middle or end<br>component in a Route: |  |
| Use Exist<br>cSEDA | Click [...] and select<br>the corresponding consumer in the dialog box. |

## Advanced settings

| Properties | Description |
| --- | --- |
| Arguments | This option is available only when cSEDA is used as a start component in the Route. Set the<br>optional arguments in the corresponding table. Click [+] as many times as required to add<br>arguments to the table. Then click the corresponding Value field and enter a value. See the site<br>http://camel.apache.org/seda.html for available<br>options. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | cSEDA is used as a start, middle,<br>or end component in a Route. |
| Limitation | n/a |

**Related concepts**

* [Using cSEDA, cVM and cDirect to produce and consume messages separately](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-seda/cseda-cvm-ctimer-clog-using-cseda-cvm-and-cdirect-to-produce-and-consume-messages-separately)