camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Straube <claus.stra...@catify.com>
Subject Re: Idempotent consumer question
Date Tue, 21 Jun 2011 14:50:26 GMT
But what you want to do is to store something into a store (e.g. a 
cache, database, file system,...) then make a lookup if it is inside the 
store, if not put it in. I don't understand why it should be more effort 
to write 5 lines route code than implementing it. There're 1000 use 
cases that could be eventually implemented into camel core, but I think 
the main value of camel is that it is that they are NOT there.

Best regards - Claus

On 21.06.2011 15:10, mcaserta wrote:
> I was thinking of wiring into Camel something that can be used like this:
>
> from("webservice")
>              .cachingConsumer(header("myMessageId"),
>                      InMemoryRepository.inMemoryRepository(200))
>              .bean("myProcessor");
>
> This should work like this:
>
> - if the repository contains the key, the value is returned and further
> route processing is skipped
> - if the repository does not contain the key, further route processing
> occurs and (this is the tricky part I guess) at the end of the route the
> answer is stored in the repository
>
> This would simplify a lot the otherwise necessary route made using a caching
> component such as hazelcast.
>
> What do you think?
>
> Ciao, Mirko.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Idempotent-consumer-question-tp4510383p4510515.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
View raw message