camel-jsonpath in correlationExpression of aggregate EIP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

camel-jsonpath in correlationExpression of aggregate EIP

Kapeta
My input json are

1.{"com.mycompany.app10.Person":{"firstName":"Gregory","surname":"Smith","type":"FAMILY"}}

2.{"com.mycompany.app10.Person":{"firstName":"Hady","surname":"Smith","type":"SINGLE"}}

i need to aggregate above input when it has "com.mycompany.app10.Person" , so i tried below route to achieve it but even though i used wrong   jsonpath expression it is getting aggregated.

<route id="aggregate_route2">
            <from id="aggregate_from2" uri="activemq:queue:BeanioAggregate.Q"/>
            <aggregate completionSize="2" id="_aggregate1" strategyRef="myStrategy">
                <correlationExpression>
                    <jsonpath suppressExceptions="true">$..com.mycompany.app10.Personsadf</jsonpath>
                </correlationExpression>
                <log id="aggregate_log1" message="Body aggregate >>${body}"/>
                <to id="aggregate_to2" uri="activemq:queue:Aggregate.Q"/>
            </aggregate>
        </route>

How to use the jsonpath in correlation expression to aggregate my input and also have to find the "type" based aggregation also. Thank in advance.
Loading...