How to aggregate one message into multiple group with camel aggregate?
问题 I'm trying to generate a aggregate view of consecutive market data, which means we need to calculate the sum value every 2 message. say the data coming in as: (V0,T0),(V1,T1),(V2,T2),(V3,T3).... V means value T means timestamp when we receive the data. We need to generate the sum for every 2 points say: (R1=Sum(V0,V1),T1),(R2=Sum(V1,V2),T2),(R3=Sum(V2,V3),T3),.... Any suggestion how can we do this by using aggregator2 or we need to write a processor for this? 回答1: You are right, aggregator2