[
https://issues.apache.org/jira/browse/CAMEL-25930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130176#comment-18130176
]
Claus Ibsen commented on CAMEL-25930:
-------------------------------------
Backported to camel-4.18.x (https://github.com/apache/camel/pull/28267, commit
aaeaead8429f) and camel-4.22.x (https://github.com/apache/camel/pull/28266,
commit ca5c8e481049).
_Claude Code on behalf of davsclaus_
> 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.18.5, 4.22.1, 4.23.0
> Reporter: Otavio Rodolfo Piske
> Assignee: Otavio Rodolfo Piske
> Priority: Major
> Fix For: 4.18.6, 4.22.3, 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
(v10.3.26#10030026)