[
https://issues.apache.org/jira/browse/CAMEL-21691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922732#comment-17922732
]
Claus Ibsen commented on CAMEL-21691:
-------------------------------------
So due to how kafka must use its own thread to process the records, then the
interval cannot be triggered from a background scheduled task and thus is not
triggering exactly at a given interval.
The pollTimeoutMs should be kept as default ideally as it will be used to wake
up kafka consumer and allow the interval to trigger, for example if there are
only a few records or none at all.
So keep this at 5s etc and then use the interval such as 20s etc. Then the
interval is triggered between 20 + 5 sec or so
> camel-kafka - Add pollIntervalMs option to trigger batch completion per
> interval
> --------------------------------------------------------------------------------
>
> Key: CAMEL-21691
> URL: https://issues.apache.org/jira/browse/CAMEL-21691
> Project: Camel
> Issue Type: Improvement
> Components: camel-kafka
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 4.x
>
>
> To make it possible to trigger batch when either hits first
> * max messages
> * interval after X seconds
> This allows to ensure batches can be processed in case there are no new
> messages or they are sent very slowly
--
This message was sent by Atlassian Jira
(v8.20.10#820010)