...
Batch Consumer is basically a Polling Consumer that is capable of polling multiple Exchanges in a pool. What we have done in Camel 2.0 is to standardize this into a org.apache.camel.BatchConsumer
interface that a consumer can implement to indicate it support supports batching as well.
The following components supports support the use of the Batch Consumer by its consumertheir consumers:
Consumer Options
The Batch Consumer supports the following options:
Option | Description |
---|---|
| An integer to define a maximum messages to gather per poll. By default no maximum is set. Can be used to set a limit of e.g. |
Exchange Properties
The following properties is set on the Exchange for each Exchange polled in the same batch.
Property | Description | ||
---|---|---|---|
| A | CamelBatchSize | The total number of Exchanges that was polled in this batch. |
| The current index of the batch. Starts from | ||
| The total number of Exchanges that was polled in this batch | CamelBatchComplete | A boolean indicating the last Exchange in the batch. Is only |