camel-kafka-connector icon indicating copy to clipboard operation
camel-kafka-connector copied to clipboard

Kafka Events batching

Open AishD3 opened this issue 11 months ago • 4 comments

Hi @oscerd , we would like batch some amount of kafka records while a file is created in data lake . We are using below configs in Kafka Connect for that , but batching is not working , is it correct and am I missing something.

camel.aggregation.size: 5
camel.aggregation.timeout: 5000

AishD3 avatar Mar 11 '24 09:03 AishD3

https://camel.apache.org/camel-kafka-connector/4.0.x/user-guide/aggregation.html

oscerd avatar Mar 11 '24 09:03 oscerd

@oscerd Yes we referred to this , but do we need to add camel.beans.aggregate=#class:org.apache.camel.kafkaconnector.aggregator.StringAggregator

as well , or only

camel.aggregation.size: 5 camel.aggregation.timeout: 5000

is enough

AishD3 avatar Mar 11 '24 09:03 AishD3

You need to add a bean because otherwise Camel don't know how to aggregate.

oscerd avatar Mar 11 '24 10:03 oscerd

Thanks a lot its working

AishD3 avatar Mar 11 '24 10:03 AishD3