sarians
sarians

Reputation: 31

Camel Aggregator EIP improve speed

I'm working on a route using Apache Camel and the aggretaor EIP. The route consumes data from a database via jms, aggregates it and sends them to a webservice.

The aggregator persists the data in an oracle database.

As we all know, the sync block of the aggreagtor is the boddle neck in that route.

I already tried to use multiple buckets (correltionExpression = threadName), but it didn't improve the speed as much as wanted...

I need at least 150 messages a second. At the moment only 70 are possible :(

Does anyone have an idea how the speed can be improved? Maybe a second Aggregator? Are there any suggestions?

One last question: is the aggregator able to write messages in multiple buckets in parallel or is that not the case because of the lock? Because the documention inside the code says it is (concurrent aggregation per correlation key could improve performance), the code itself doesn't do it in my opinion.

Thanks in advance!!

Stefan

Upvotes: 3

Views: 878

Answers (2)

Mahesh
Mahesh

Reputation: 62

You can implement the aggregator using HawtDB file repository. Although I'm already facing performance problems with the HawtDB or Level DB repositories in my application, I'm sure it'll be faster than JDBC persistence.

As far as I've seen, nothing beats in-memory aggregation if you are ready to sacrifice the data persistence.

Upvotes: 1

Claus Ibsen
Claus Ibsen

Reputation: 55710

You can implement your own AggregationRepository, and in there you can do bulk saves to your database.

The out of box JDBC based is doing one update/insert at a time.

Upvotes: 0

Related Questions