Copy all files using file:// protocol in Camel on Fuse ESB 7.1 even those which were copied a minute ago

Solution Verified - Updated -

Issue

We are trying to implement Scheduled File transfer in Camel using the CronScheduledRoutePolicy. Our requirements are:
1. Copy all files from one directory to another every minute
2. Don’t remove any files from the source
3. All files must be copied – even those which were copied a minute ago
Below is how we implemented this in Camel (version 2.10.0.fuse-71-047), however it doesn’t copy the files which were copied a minute ago. It looks like even if the route is stopped before being started, it still remembers which files were already copied.

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
           xsi:schemaLocation="
            http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
            http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
            http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0 http://aries.apache.org/schemas/blueprint-ext/blueprint-ext.xsd
            http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
           ">

    <bean id="cronPolicy" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
        <property name="routeStartTime" value="0 * * * * ?"></property>
        <property name="routeStopTime" value="30 * * * * ?"></property>
    </bean>

    <camelContext xmlns="http://camel.apache.org/schema/blueprint" id="scheduledtransfer">

        <route id="scheduledtransfer-source-to-destination" routePolicyRef="cronPolicy" autoStartup="false">
            <from uri="file:///source/?noop=true&delay=5000"></from>

            <log loggingLevel="INFO" message="Sending ${file:name} ..."></log>
            <to uri="file:///destination/"></to>
            <log loggingLevel="INFO" message="Sending ${file:name} ... DONE"></log>
        </route>

    </camelContext>
</blueprint>

Environment

Fuse ESB 7.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content