camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcaserta <mirko.case...@gmail.com>
Subject Re: Idempotent consumer question
Date Tue, 21 Jun 2011 13:10:20 GMT
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