Re: Problem with FileConsumer and pollEnrich
I have committed the file and also added a pre check on the pollEnrich to indicate that it does not currently support polling from a file based endpoint when the starting endpoint is also file based. To implement this properly takes much more work currently than we have as 2.0 is in its final stages. And to properly support your use case the pollEnrich needs to support dynamic URI definition using Expression otherwise you cannot set the filename you want to consume. The unit test I added shows how to do this. Using Java code with a ConsumerTemplate. On Mon, Aug 10, 2009 at 9:03 AM, akuhtz wrote: > > Yes, but trunk doesn't build currently ;-) ... If you commit it later, no > problem. > > -- > View this message in context: > http://www.nabble.com/Problem-with-FileConsumer-and-pollEnrich-tp24795192p24895196.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Problem with FileConsumer and pollEnrich
Yes, but trunk doesn't build currently ;-) ... If you commit it later, no problem. -- View this message in context: http://www.nabble.com/Problem-with-FileConsumer-and-pollEnrich-tp24795192p24895196.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with FileConsumer and pollEnrich
On Mon, Aug 10, 2009 at 8:52 AM, akuhtz wrote: > > Hi Claus, > > FileUtil.stripExt(...) does not exist on trunk ... Ah that is very easy for yourself to create such a method. Eg its just there to change the filename to use .dat as extension. Here is the code: public static String stripExt(String name) { if (name == null) { return null; } int pos = name.lastIndexOf('.'); if (pos != -1) { return name.substring(0, pos); } return name; } > -- > View this message in context: > http://www.nabble.com/Problem-with-FileConsumer-and-pollEnrich-tp24795192p24895089.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Problem with FileConsumer and pollEnrich
Hi Claus, FileUtil.stripExt(...) does not exist on trunk ... -- View this message in context: http://www.nabble.com/Problem-with-FileConsumer-and-pollEnrich-tp24795192p24895089.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with FileConsumer and pollEnrich
Hi See this unit test with some sample code the demonstrates how to do that with Camel in 2.0m3 http://svn.apache.org/viewvc?view=rev&revision=802661 On Sun, Aug 9, 2009 at 5:16 AM, ariablu<962...@gmail.com> wrote: > > When > > C:\test\trigger\AAA.fin(0KB) > C:\test\data\AAA.dat(300MB) > > if I run Camel2.0M3 ... > > C:\test\trigger\AAA.fin(0KB) > C:\test\data\.done\AAA.dat(300MB) > > But I want to > > C:\test\trigger\.done\AAA.fin(0KB) > C:\test\data\.done\AAA.dat(300MB) > > > -- > View this message in context: > http://www.nabble.com/Problem-with-FileConsumer-and-pollEnrich-tp24795192p24883966.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Problem with FileConsumer and pollEnrich
On Sun, Aug 9, 2009 at 5:16 AM, ariablu<962...@gmail.com> wrote: > > When > > C:\test\trigger\AAA.fin(0KB) > C:\test\data\AAA.dat(300MB) > > if I run Camel2.0M3 ... > > C:\test\trigger\AAA.fin(0KB) > C:\test\data\.done\AAA.dat(300MB) > > But I want to > > C:\test\trigger\.done\AAA.fin(0KB) > C:\test\data\.done\AAA.dat(300MB) > > > -- > View this message in context: > http://www.nabble.com/Problem-with-FileConsumer-and-pollEnrich-tp24795192p24883966.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > Hi I have created a ticket to track this issue https://issues.apache.org/activemq/browse/CAMEL-1895 -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Problem with FileConsumer and pollEnrich
When C:\test\trigger\AAA.fin(0KB) C:\test\data\AAA.dat(300MB) if I run Camel2.0M3 ... C:\test\trigger\AAA.fin(0KB) C:\test\data\.done\AAA.dat(300MB) But I want to C:\test\trigger\.done\AAA.fin(0KB) C:\test\data\.done\AAA.dat(300MB) -- View this message in context: http://www.nabble.com/Problem-with-FileConsumer-and-pollEnrich-tp24795192p24883966.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with FileConsumer and pollEnrich
On Mon, Aug 3, 2009 at 7:51 PM, ariablu<962...@gmail.com> wrote: > > using Apache Camel (2.0M3) and Spring, > > > uri="file:C:\test\trigger?initialDelay=1000&delay=500&useFixedDelay=false&recursive=false&delete=false&noop=false&move=.done&idempotent=false&readLock=none&readLockTimeout=0&autoCreate=true&flatten=false"/> > uri="file:C:\test\data?initialDelay=1000&delay=500&useFixedDelay=false&recursive=false&delete=false&noop=false&move=.done&idempotent=false&readLock=none&readLockTimeout=0&autoCreate=true&flatten=false" > timeout="5000" /> > uri="log:testlog?level=INFO&showExchangeId=true&showProperties=true&showBodyType=true&showBody=true&showOut=true&multiline=true"/> > > > FileConsumer("from" tag) move files from C:\test\data to C:\test\data\.done > , and not move files from c:\test\trigger to c:\test\trigger\.done . > > Is this correct? > You are clashing the file consumer with a poll enrich that also uses a file consumer. What do you want to archive, what is your use case? > -- > View this message in context: > http://www.nabble.com/Problem-with-FileConsumer-and-pollEnrich-tp24795192p24795192.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Problem with FileConsumer and pollEnrich
using Apache Camel (2.0M3) and Spring, FileConsumer("from" tag) move files from C:\test\data to C:\test\data\.done , and not move files from c:\test\trigger to c:\test\trigger\.done . Is this correct? -- View this message in context: http://www.nabble.com/Problem-with-FileConsumer-and-pollEnrich-tp24795192p24795192.html Sent from the Camel - Users mailing list archive at Nabble.com.