camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gareth Western <>
Subject Re: Problem with JdbcAggregationRepository
Date Fri, 10 Apr 2015 14:18:01 GMT
Nevermind. It was my own fault. MyAggregateStrategy was not updating the 
oldExchange "in" message body before returning the oldExchange.

It's annoying that this is not a problem when using the InMemory 
repository, but does make sense.

On 10. april 2015 15:34, Gareth Western wrote:
> I'm having trouble using the JdbcAggregationRepository. Our route is 
> as follows:
>         from(JMS_QUEUE)
>             .transacted()
>             .aggregate(constant(true), new MyAggregateStrategy())
>                 .completionTimeout(5000)
>                 .completionSize(100)
>                 .aggregationRepository(jdbcAggregationRepository)
>             .to(NEXT_JMS_QUEUE);
> We need to use the JdbcAggregationRepository in case the application 
> goes down while aggregating. The messages do not have any content in 
> common, so we use a constant correlation expression.
> When using the default in-memory aggregation repository then 
> everything works fine, but when we try to use the Jdbc repository the 
> last message consumed from JMS is the only message delivered to the 
> web service. I was expecting the repository to update the database 
> record every time a message is consumed, so that the final result is 
> the collection of messages rather than just a single one.
> Does anyone know why this is happening? Looking through the source 
> code for jdbcAggregationRepository I can't actually see where the 
> exchange body should be updated (grouped), but presumably it's in 
> org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository#insertAndUpdateHelper.
> Thanks for any help!
> Gareth
> PS Camel 2.14.1

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message