简体   繁体   English

骆驼:CSV的文件轮询器

[英]camel : File Poller of CSV

I want to do File Poller of CSV, then unmarshaling.like this: 我想做CSV的File Poller,然后拆封。像这样:

<route>
    <from uri="file:///some/path/to/pickup/csvfiles?delete=true&amp;consumer.delay=10000" />
        <unmarshal>
            <csv />
        </unmarshal>
    <to uri="bean:myCsvHandler?method=doHandleCsvData" />
</route>

But I also want to get also the file name in my bean. 但是我也想在bean中获得文件名。 How do I do this ? 我该怎么做呢 ?

使用Exchange doHandleCsvData(Exchange exchange)绑定doHandleCsvData(Exchange exchange)然后可以从标头中获取文件名,提取正文并处理数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从服务混合文件轮询器迁移到 apache 骆驼文件轮询器 - Migrating from service-mix file poller to apache camel file poller 骆驼在正则表达式上拆分CSV文件 - Camel split CSV file on regex 骆驼:使用BindyCSVFormat处理CSV文件中的动态列 - Camel: Dealing with dynamic columns in CSV file with BindyCSVFormat 如何在Apache Camel Bindy中处理CSV文件中的不同记录? - How to handle different records within a CSV file in a Apache Camel Bindy? 带有监视服务和 LastModifiedFileListFilter 的 Spring 集成文件轮询器 - Spring Integration File Poller with Watch Service and LastModifiedFileListFilter 使用Apache Camel插入大型CSV文件时出现GC问题 - GC problems when inserting large CSV file with Apache Camel Apache骆驼-SQL到CSV - Apache camel - SQL to CSV 当某些列带有引号而不是某些列时,如何使用骆驼绑定来解析csv文件? - How to parse csv file with camel bindy, when some columns have quotes and some not? 如何使用附加字段丰富 csv 内容数据,并使用 apache camel 将管道作为分隔符转换为文本文件 - How to enrich the csv content data with additional fields and convert into text file with pipe as delimiter using apache camel 如何从http使用apache camel只读一次csv文件? - How can I read csv file using apache camel only once from http?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM