Clone
Federico Valeri <fvaleri@users.noreply.github.com>
committed
on 21 May
[CAMEL-7810] Fix JdbcAggregationRepository optimistic locking feature (#3837)
Running JdbcAggregationRepository on a distributed environment… Show more
[CAMEL-7810] Fix JdbcAggregationRepository optimistic locking feature (#3837)

Running JdbcAggregationRepository on a distributed environment (multiple independent

threads or multiple JVMs) we have silently dropped exchanges. This PR aims at introducing

a version identifier to avoid the lost update problem (overwrites when updating the

aggregate row) as stated by the OptimisticLockingAggregationRepository SPI.

Tested running 100 threads to aggregate 10k messages on MySQL 5.7 and PostgreSQL 11.5.

Co-authored-by: Federico Valeri <fvaleri@localhost> Show less