camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siano, Stephan" <>
Subject RE: Custom Idempotent Jdbc repository + Using lastmodified time
Date Tue, 18 Sep 2012 05:25:32 GMT
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

-----Original Message-----
From: Christian Müller [] 
Sent: Montag, 17. September 2012 23:57
Subject: Re: Custom Idempotent Jdbc repository + Using lastmodified time

Checkout: and

Instead of
    .idempotentConsumer(header("myMessageId"), ...

try something like



On Mon, Sep 17, 2012 at 11:34 PM, webber78 <> 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:
> Sent from the Camel - Users mailing list archive at


View raw message