You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "onder sezgin (JIRA)" <ji...@apache.org> on 2017/05/10 07:53:04 UTC

[jira] [Commented] (CAMEL-11250) File consumer - Allow to specify a header that has the file name to poll

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

onder sezgin commented on CAMEL-11250:
--------------------------------------

Probably i am getting wrong, that's why i want to ask.

I remember reading from Camel in Action 

{quote}
Enrich and pollEnrich can’t access information in the current exchange
Neither enrich nor pollEnrich can leverage any information from the current exchange.
This means, for example, that you can’t store a filename header on the exchange
for pollEnrich to use to select a particular file. This may change in the future
if the Camel team can find a solution.
{quote}

so setting header first and doing pollEnrich would help? 
besides, as an initial look at the file consumer, i could not understand a way to access current exchange to match the file via org.apache.camel.component.file.GenericFileConsumer#isMatched. i think it is my bad :)

> File consumer - Allow to specify a header that has the file name to poll
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-11250
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11250
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>             Fix For: Future
>
>
> See SO
> http://stackoverflow.com/questions/43849165/camel-pollenrich-generating-a-lot-of-timed-waiting-threads
> We can have a FILE_FILTER_NAME header that matches in the 
> org.apache.camel.component.file.GenericFileConsumer#isMatched(org.apache.camel.component.file.GenericFile<T>, boolean, java.util.List<T>)
> so end users can set the header first and then do a pollEnrich with a static endpoint.
> The header can then use equalsIgnoreCase and reguar exp for matching, to make it easier to match files.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)