Hi Oliver,

Assuming that the MFO ID can be placed into a header, you can do:

    .aggregate(header("mfo"), myAggregationStrategy)

The first argument to the aggregate statement is a correlation expression, which effectively defines what messages need to be aggregated with each other. You can use any expression language here, such as simple or bean - header is just an example.

Cheers,

Jakub

On 04/01/17 08:29, okieven wrote:
Hi all,

I´m having problems using the camel aggregator for my use case. First I will
explain the use case itself to hopefully get some answers to solve my
problem.

I fetch n messages (M) from the database, which have different message
formats (MFO) identified by a MFO ID, e.g. M1 = MFO1, M2 = MFO1, M3 = MFO2,
M4 = MFO3. Then the messages are split before they get aggregated.

Now I want the aggregatror to publish a message for every MFO group. The
result should be (+ stands for aggregation), where each message has to be
published:
NewMessage1 = M1 + M2
NewMessage2 = M3
NewMessage3 = M4

I tried a lot of configurations, wrote my own aggregator etc, but nothing
worked fine for me.

How can I achieve this?

Thanks,
Oliver



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Aggregator-issue-tp5792131.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to