Consumer template ignores options in uri for file consumer
----------------------------------------------------------
Key: CAMEL-3358
URL: https://issues.apache.org/activemq/browse/CAMEL-3358
Project: Apache Camel
Issue Type: Bug
Affects Versions: 2.2.0
Environment: Debian sid i686
sun jdk 1.6.0_22-b04
apache-servicemix-4.2.0-fuse-02
Reporter: Pham Ngoc Hai
I have an OSGi bundle:
My camel-context.xml:
------------
<osgi:camelContext xmlns="http://camel.apache.org/schema/spring">
<template id="producer" />
<consumerTemplate id="consumer" />
<routeBuilder ref="routeBuilder"/>
</osgi:camelContext>
<bean id="routeBuilder"
class="com.proiam.postmarque.customer.RouteBuilder">
</bean>
<bean id="customerFilePolling"
class="com.proiam.postmarque.customer.CustomerFilePolling">
<property name="pullAddress" value="${pullAddress}" />
</bean>
------------------
RouteBuilder:
------------------
from("quartz://customer4pxfilein?cron=" + cronTime)
.beanRef("customer4PXFilePolling", "pollFiles");
-----------------
pollFiles:
-----------------
public class CustomerFilePolling {
//@AutoWired gives me NPE
@EndpointInject
ConsumerTemplate consumer;
//@AutoWired gives me NPE
@EndpointInject
ProducerTemplate producer;
public void pollFiles() {
while (true) {
//System.out.println("Prepare to comsume");
Exchange exchange =
consumer.receive("file:///tmp/test/in?move=../done&readLock=changed", 2000);
if (exchange == null) {
break;
}
Exchange result =
producer.send("activemq:queue:CustomerFileInBody", exchange);
if (result.isFailed()) {
System.out.println("pollFiles processor raised
an error!");
}
}
}
}
--------------
Everything is fine except that after being processed, the files are still there
together with their .camelLock
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.