[ 
https://issues.apache.org/jira/browse/CAMEL-21947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943528#comment-17943528
 ] 

Håkan Lantz commented on CAMEL-21947:
-------------------------------------

[~davsclaus] I have now added a PR for this issue with the proposed fix and a 
unit-test to validate it.

I'm not sure how (and if) I should add my unit-test to the list of unit-tests 
that run on maven build.

I placed the unit-test in the "org.apache.camel.component.file.consumer" 
package since I wanted it to test both with a file and sftp Endpoint and I was 
not able to add the 'camel-test-junit5' (to subclass CamelTestSupport) in the 
'components/camel-file' module.

Regards,
Håkan.

> GenericFileConsumer with eager idempotence and read lock stop processing file
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-21947
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21947
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-file, camel-ftp
>    Affects Versions: 4.8.6, 4.10.3, 4.11.0
>            Reporter: Håkan Lantz
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.12.0, 4.10.4, 4.8.7
>
>
> Hello,
> We have found a problem with the SftpConsumer (that applies for all file 
> cosumers).
> When it has been configured with "readLock=changed" and 
> "idempotentEager=true" the _GenericFileConsumer_ will in the _poll_ method:
>  # On the call to the _pollDirectory_ method store the idempotence key in the 
> idempotence repository (using the notUnique method)
>  # On the call to the _processBatch_ method it may fail to acquire a read 
> lock before the specified _readLockTimeout_ has been reached.
> When this occurs the file is silently left on the SFTP server and will not be 
> picked up.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to