camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: GenericFileConsumer - Idempotent and InProgress repositories
Date Mon, 13 May 2013 05:53:21 GMT

Yeah we can check the in progress repo a bit more eager in case we
have a file candidate

Though we should do the isValidFile first as it skips unwanted file
patterns etc.

On Thu, May 9, 2013 at 8:05 PM, swwyatt <> wrote:
> The implementations of the GenericFileConsumer (FileConsumer,
> SftpConsumer,...) method, pollDirectory(), make calls to isValidFile() and
> if that returns true, calls isInProgress(). This process fails when there
> are multiple processes polling. For example when process P0 calls
> isValidFile() and the idempotent repository does not have the file entry, it
> then calls isInProgress(). But, if process P1, who is in progress for the
> file, commits to the idempotent repository and subsequently releases its
> entry in the in progress repository, then P0 may obtain an in progress
> status and process a file that is now in the idempotent repository.
> Should the isInProgress() call be made before the isValidFile() call? This
> may have additional overhead of checking the in progress repository, but the
> chance for duplicate processing would be removed.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message