Hi Reji, I would suggest you use a local cache implementation with an entry TTL or FIFO eviction support with a maximum limit on entry count.
I find myself using Guava caches quite often when I require a lightweight cache [1] like what you describe. Beware that the content of the repository will not survive Camel context restarts, or a restart of anything further down the stack (app server, container, machine, etc.), but I guess you already are onto that since you're specifically using a Memory-based idempotent repo. [1] https://github.com/google/guava/wiki/CachesExplained Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Fri, Sep 18, 2015 at 5:40 PM, contactreji <contactr...@gmail.com> wrote: > Hello friends > > I have implemented a idempotent consumer which filter's out duplicates. > > Implemented it using MemoryIdempotentRepository implementation. > > However, I feel that if the server runs over a long period of time, it must > eventually run out of memory after storing all the filter keys for a long > period of time. > > Is there a way we can clear the Memory Idempotent Repository after a > certain > period of time? Or is there an API which I can call and get it cleared from > the memory? > > Cheers > Reji > > > > ----- > Reji Mathews > Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel > & Jboss Fuse ESB | Mule ESB ) > LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a > Twitter - reji_mathews > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-MemoryIdempotentRepository-based-Idempotent-Consumer-tp5771668.html > Sent from the Camel - Users mailing list archive at Nabble.com. >