There are actually two potential usages for idempotent repositories in conjunction with (S)FTP endpoints: usage in the endpoint itself or with an idempotent consumer in the pipeline (as you describe). If you have the idempotent repository directly in the endpoint this has the advantage that it is applied before the file is even fetched from the server, however AFAIK the only available information for this is the filename. With idempotent consumers in the pipeline, you are free to do whatever you want, but this is after you have fetched the file from the server.
So to answer the original question: AFAIK there is no way to put any exchange properties to an idempotent repository that is attached to the endpoint using the idempotentRepository parameter in the file/FTP/SFTP endpoint, because there is actually no exchange at the time it is used. If you are willing to download all files and then select which ones you want to process, the idempotent consumer Christian described is the way to go. Best regards Stephan -----Original Message----- From: Christian Müller [mailto:christian.muel...@gmail.com] Sent: Montag, 17. September 2012 23:57 To: users@camel.apache.org Subject: Re: Custom Idempotent Jdbc repository + Using lastmodified time Checkout: http://camel.apache.org/idempotent-consumer.html and http://camel.apache.org/simple.html Instead of from("direct:a") .idempotentConsumer(header("myMessageId"), ... try something like from("direct:a") .idempotentConsumer(simple("${header.CamelFileNameOnly}-${header.CamelFileLastModified}"), ... Best, Christian On Mon, Sep 17, 2012 at 11:34 PM, webber78 <kiran.baire...@gmail.com> wrote: > Thanks for your reply. Is there anyway I can get the header you described > in > a subclass of AbstractJdbcMessageIdRepository. I saw a few examples of > getting headers using the Exchange object, but not sure how to get access > to > these from an idempotent repository. > > Thanks, > Kiran > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Custom-Idempotent-Jdbc-repository-Using-lastmodified-time-tp5719480p5719495.html > Sent from the Camel - Users mailing list archive at Nabble.com. > --