camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to remove the path from the idempotent messageid
Date Mon, 21 Nov 2011 07:49:21 GMT
On Sun, Nov 20, 2011 at 3:47 AM, gilbertlangevin
<gilbert.langevin@bell.ca> wrote:
> Hi,
>
>    I upgraded our projet from Camel 2.1 to Camel 2.8.2. I am using spring
> jpa to store our idempotent status across servers. The source files are
> comming from sftp. In version 2.1, the path was not appearing in the
> messageid of the jpa table, but now it is there. It's causing me issues. I
> tried to use the file parametere flatten, but the path is still recorded in
> the messageid. The file could be anywhere, I only want to process it once.
>
>     Is there a way to only get the filename in the messageid?
>

No not out of the box. You can implement/extend your custom idempotent
repo, and then strip off the paths
from the keys.

But it seems maybe like a good option to have on the file/ftp
components to be able to determine this.
Feel free to add a JIRA ticket for such a new option.

And we love contributions, so patches is of course welcome as well.
http://camel.apache.org/contributing.html


>    I saw some topics about the pathname beeing added in version 2.4, but I
> cannot find a way to get back to the old behavior I had.
>
> Here is the xml for one of the jpa:
>
>        <bean id="jpaStore"
>                class="org.apache.camel.processor.idempotent.jpa.JpaMessageIdRepository">
>
>                <constructor-arg index="0" ref="jpaTemplate" />
>
>                <constructor-arg index="1" value="FileConsumer" />
>        </bean>
>
>
> And here is an endpoint from which we are consuming our data files:
>
> sftp://#{sftp.username}@#{sftp.server.ip}/#{route.remotedir.feed1}?
> maxMessagesPerPoll=100&
> sortBy=file:name&
> filter=#gzFilesFilter&
> binary=true&flatten=true&
> consumer.delay=15000&
> consumer.initialDelay=15000&
> consumer.useFixedDelay=true&
> idempotent=true&
> idempotentRepository=#jpaStore&
> inProgressRepository=#jpaStoreInProgress&
> noop=true
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-remove-the-path-from-the-idempotent-messageid-tp5007718p5007718.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message