Hi

Are you sure jsonpath $ will return a list or something that can be
iterated for the splitter to turn into 10 elements.
As you have timeout 1s then it may be that this is what causes the output
of the trigger.

Make sure you jsonpath is correct, there are online jsonpath validators you
can try with your json sample input

On Fri, May 19, 2023 at 11:55 PM Sahil Upneja <upnej...@gmail.com> wrote:

> Hi Team,
>
> I am not able to use aggregate with Splitter in Camel Version 3.20.0.
>
> *completionSize* is not getting considered when I am using Aggregate inside
> the Splitter
>
> Splitter is splitting in batches of 1 only, but I want to split Json array
> of large size say 100 into batches of 10.
>
> Below is my code snippet
>
>
> <bean id="myStrategy"
>
> class="org.apache.camel.processor.aggregate.GroupedBodyAggregationStrategy"/>
>
>
> <route>
>     < from uri : splitter>
>     <split>
>         <jsonpath>$</jsonpath>
>         <aggregate aggregationStrategy= "myStrategy"
>                    *completionSize="10"* completionTimeout="1000">
>             <correlationExpression>
>                 <constant>true</constant>
>             </correlationExpression>
>             <marshal>
>                 <json></json>
>             </marshal>
>         </aggregate
>     </split>
>     < to uri : transformer>
> </route>
>
>
> Can you please suggest how to achieve this.
>
> Thanks & Regards
>
> Sahil
>


-- 
Claus Ibsen
-----------------
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to