0

This is my Camel Route:

<route>
  <from uri="file:///c:/"/>
  <to uri="file:///D:/"/>
</route>

In case of any failure in this route I want to persistently store files in Kaha DB so that files won't be lost. But am not aware of blueprint.xml configuration of Kaha DB persistence for storing files. And my Activemq.xml file is as follows

<broker brokerName="kahaDB_Persistence" persistent="true" useShutdownHook="false">
    <persistenceAdapter>
        <kahaDB directory="${data}/kahadb/"
                journalMaxFileLength="100mb"
                concurrentStoreAndDispatchQueues="false"
                concurrentStoreAndDispatchTopics="false"/>
    </persistenceAdapter>
</broker>

Please advise me how to connect to this KahaDB from blueprint.xml by considering above mentioned route.

Paul Roub
  • 36,322
  • 27
  • 84
  • 93

1 Answers1

0

Camel's file component has a built in archive feature that saves files that have been processed. It copies them into a folder called ".camel", but it can be changed with a configuration option.

I would not recommend using KahaDB, as it doesn't fit the "right tool for the job" mantra.

Camel File component docs

Matt Pavlovich
  • 4,087
  • 1
  • 9
  • 17
  • Maat thanks for respose, i don't want files to be .camel or any other directory. These will be gone once ESB is down. Tried noop=true as well but once ESB is re-started it process old file as well. My scenario is exactly like message persistence once message is delivered to consumer then it will be deleted from the Database. – user1468077 Nov 30 '16 at 15:05
  • I don't know what you mean regarding the files going away after restart. We use a .done and a .failed folder for file archival. It works. As to the noop=true and reprocessing of old files upon restart, you would need to investigate the idempotent settings / options to avoid that, but keeping the files in the incoming folder is probably not the correct solution at any rate. – Steve Harrington Nov 30 '16 at 20:31
  • +1 Steve. The behavior described by user1468077 is inconsistent with default Camel file component and inconsistent with using KahaDB by itself. – Matt Pavlovich Nov 30 '16 at 21:47