Claus Ibsen created CAMEL-25829:
-----------------------------------
Summary: camel-mina-sftp - poll and pollEnrich with a dynamic
fileName resolve an endpoint for each file, as the component has no
poll-dynamic support
Key: CAMEL-25829
URL: https://issues.apache.org/jira/browse/CAMEL-25829
Project: Camel
Issue Type: Improvement
Components: camel-sftp
Reporter: Claus Ibsen
Fix For: 4.24.0
The file components register a {{PollDynamicAware}}, each a subclass of
{{GenericFilePollDynamicAware}} ({{@PollDynamic("sftp")}} and so on): file,
ftp, ftps, sftp, azure-files and smb. For {{pollEnrich}} or {{poll}} with a
dynamic {{fileName}}, such as {{sftp:host/orders?fileName=$\{header.file\}}},
it keeps one endpoint without the {{fileName}}, and the consumer gets the name
of the file for each poll.
camel-mina-sftp (scheme {{mina-sftp}}, since 4.18) has none. So a
{{pollEnrich}} with a dynamic {{fileName}} resolves a new endpoint for each
name of a file, each with a consumer of its own. And its {{fileName}} does not
follow the rule that CAMEL-25792 gives the other file components: the file
functions are about the file found, and anything else is about the current
message.
Its consumer extends {{AbstractSftpConsumer}}, which is a
{{GenericFileConsumer}}. So a {{MinaSftpPollDynamicAware}}, like the one of
sftp, with a test like the one of sftp, should be all it takes.
Found while working on CAMEL-25792.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)