New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read lock options for files are ignored #1105
Comments
does this happen in native or jvm mode ? |
Hi |
I think you need to reference a bean from a registry, like with
where
|
readLock=change is actually one of the out of the box implementations, so you should NOT use it together with exclusiveReadLockStrategy as that is for using a custom implementation. And if you really want to use that, then use the style luca says with the |
I can try that. But even without any explicit strategy it should work. While debugging it never cared about |
Just to make this clear: it shows the same behavior without the option While debugging the test |
Works on camel master (not camel-quarkus) so if there is something wrong then its in camel-quarkus. Its the FileProcessStrategyFactory that should be used as it has the file only strategy such as changed, so you are debugging the wrong class. |
Thanks for testing with Camel! I would like to debug |
Another short round of debugging revealed this: I do not know if the key itself is correct, but there is not even a class Something is broken. Either my setup or this part of class loading in Camel Quarkus. I tried it with two different systems (Windows, Linux). |
@philschaller ok I see what the problem could be, do you mind sending a PR with a filing test ? |
Describe the bug
I created a minimal integration test in a separate branch of my fork:
https://github.com/philschaller/camel-quarkus/tree/readLockFails
The route in the test should only move files with a minimal length. But it moves an empty file. Debugging the application showed that it always falls back to generic behavior in
GenericFileExclusiveReadLockStrategy.getExclusiveReadLockStrategy
.I also tried to convince the route to use the right read lock strategy by setting the option
exclusiveReadLockStrategy=org.apache.camel.component.file.strategy.FileChangedExclusiveReadLockStrategy
.But it does not change the result. Actually, it does not even load that class, thus it may be some class loading issue. But that is only a wild guess.
Expected behavior
Respect the read locks.
Workaround
No general one to my knowledge. But I can mitigate the problem in my application.
Environment
Camel Quarkus 1.0.0-M6 and master branch
JDK 11
The text was updated successfully, but these errors were encountered: