public interface BatchConsumer extends Consumer
Endpoint
Modifier and Type | Method and Description |
---|---|
boolean |
isBatchAllowed()
Whether processing the batch is still allowed.
|
int |
processBatch(Queue<Object> exchanges)
Processes the list of
Exchange objects in a batch. |
void |
setMaxMessagesPerPoll(int maxMessagesPerPoll)
Sets a maximum number of messages as a limit to poll at each polling.
|
getEndpoint
void setMaxMessagesPerPoll(int maxMessagesPerPoll)
maxMessagesPerPoll
- maximum messages to poll.int processBatch(Queue<Object> exchanges) throws Exception
Exchange
objects in a batch.
Each message exchange will be processed individually but the batch
consumer will add properties with the current index and total in the batch.
The items in the Queue may actually be Holder objects that store other
data alongside the Exchange.exchanges
- list of items in this batchException
- if an internal processing error has occurred.boolean isBatchAllowed()
ShutdownRunningTask
Apache Camel