Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Invalid
-
2.16.3
-
None
-
None
-
Unknown
Description
We have a problem with an aggregation using the JdbcAggreationRepository in a distributed environment.
The scenario when the problem occurs is the following : we have a route that aggregates two messages received from RabbitMQ, let's say message1 and message2. Sometimes, message1 arrives on machine1 and message2 on machine2. We observe that information contained in message1 is lost when message2 is persisted to the database. We think that problem comes from AggregateProcessor in doAggregation method. We suppose that the aggregateProcessor1 and aggregateProcessor2 get nothing from the database :
Exchange originalExchange = aggregationRepository.get(newExchange.getContext(), key);
Flow continues and aggregateProcessor1 wants to persist the exchange to the database using doAggregationRepositoryAdd methods :
doAggregationRepositoryAdd(newExchange.getContext(), key, originalExchange, answer);
When exchange is persisted, the aggregateProcessor2 wants also persists the exchange to the database but information contained in exchange1 will be lost because it uses the original exchange received from the database that was empty.
Have you encountered this problem? Is it fixed in another version?
Thank you,