[英]Apache Camel: FTP batch consumer doesn't print file batch index and file batch size
I am developing a route to download files from a FTP location batch-wise. 我正在开发一种从FTP位置批量下载文件的途径。 Please find below my route - 请在我的路线下方找到-
**from("ftp://user@ftphost/inbox?password=XXXX&binary=true&recursive=true")
.log("Batch Index = ${header.CamelFileBatchIndex}, Batch Size = ${header.CamelFileBatchSize}")
.to("file:outbox");**
The route works fine and all the files are downloaded. 该路由工作正常,所有文件都已下载。 But the batch details (ie CamelFileBatchIndex and CamelFileBatchSize) are not getting logged. 但是批次详细信息(即CamelFileBatchIndex和CamelFileBatchSize)没有被记录。
Please find below the output - 请在下面的输出中找到-
**2016-06-28 18:56:24.600 INFO 8696 --- [ main] com.camel.examples.CamelApplication : Started CamelApplication in 9.814 seconds (JVM running for 11.237)**
**2016-06-28 18:56:28.594 INFO 8696 --- [/inbox] route1 : Batch Index = , Batch Size =**
You are using the wrong names for those fields. 您为这些字段使用了错误的名称。 You can find their constant values here: http://camel.apache.org/maven/current/camel-core/apidocs/constant-values.html#org.apache.camel.Exchange.BATCH_INDEX 您可以在此处找到其常量值: http : //camel.apache.org/maven/current/camel-core/apidocs/constant-values.html#org.apache.camel.Exchange.BATCH_INDEX
Its CamelBatchSize
and CamelBatchIndex
其CamelBatchSize
和CamelBatchIndex
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.