How to use Splitter with Aggregate using xml in Apache Camel 3.20.0

I want to split Json array containing 100 Json objects using splitter and send it as a group of 10 json objects to next route

I am using Apache camel 3.20.0

This is what i tried

<route>
    < from uri : splitter>
    <split>
        <jsonpath>$</jsonpath>
        <aggregate aggregationStrategy= org.apache.camel.processor.aggregate.GroupedBodyAggregationStrategy
                   completionSize="10" completionTimeout="1000">
            <correlationExpression>
                <constant>true</constant>
            </correlationExpression>
            <marshal>
                <json></json>
            </marshal>
        </aggregate
    </split>
    < to uri : transformer>
</route>

But this is giving me error

can not find aggregation strategy in registry with name: org.apache.camel.processor.aggregate.GroupedBodyAggregationStrategy.

how to achieve this?

Read more here: Source link