Otavio Rodolfo Piske created CAMEL-25930:
--------------------------------------------
Summary: camel-file - GenericFilePollingConsumer should return the
polled exchange directly from receive
Key: CAMEL-25930
URL: https://issues.apache.org/jira/browse/CAMEL-25930
Project: Camel
Issue Type: Improvement
Components: camel-file
Affects Versions: 4.23.0, 4.22.1, 4.18.5
Reporter: Otavio Rodolfo Piske
Fix For: 4.18.6, 4.22.2, 4.24.0
GenericFilePollingConsumer.receive(...) polls the directory, puts the exchange
it found on the internal queue of EventDrivenPollingConsumer, and then takes it
back off that queue. The round trip isn’t needed, because the poll runs on the
calling thread.
The receive methods should return the exchange produced by the current poll
directly, and use the queue only as a fallback. This simplifies the receive
path.
This applies to camel-file and the components that reuse
GenericFilePollingConsumer (ftp, sftp, smb, mina-sftp, azure-files).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)