You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Vincent Broucke (Jira)" <ji...@apache.org> on 2022/02/01 14:03:00 UTC

[jira] [Created] (CAMEL-17582) Aggregation information lost in distributed environment

Vincent Broucke created CAMEL-17582:
---------------------------------------

             Summary: Aggregation information lost in distributed environment 
                 Key: CAMEL-17582
                 URL: https://issues.apache.org/jira/browse/CAMEL-17582
             Project: Camel
          Issue Type: Bug
          Components: came-core
    Affects Versions: 2.16.3
            Reporter: Vincent Broucke


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 : 

 
{code:java}
Exchange originalExchange = aggregationRepository.get(newExchange.getContext(), key);{code}
Flow continues and aggregateProcessor1 wants to persist the exchange to the database using doAggregationRepositoryAdd methods :

 

 
{code:java}
doAggregationRepositoryAdd(newExchange.getContext(), key, originalExchange, answer);{code}
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,



--
This message was sent by Atlassian Jira
(v8.20.1#820001)