camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Simple Dir Polling Has me stumped
Date Fri, 30 Sep 2011 12:38:27 GMT
Hi Mark

Great to hear its working :)


On Fri, Sep 30, 2011 at 2:27 PM, Mark <javamark@gmail.com> wrote:
> Thanks literally just found that - and it works
>
> ps Good Luck with the London meetup I was fortunate to go last year
> and it was awsome.
>
> pps I have written a cool class based on a jline console (called CamelHarness)
>
> prompt>
>
> components    consumers     dataformats   endpoints     exit
> jconsole      properties    quit          tracing       uptime
>
> There's loads of potential
>
> I hacked it together - but I think this should be in the framework ?
>

Looks great.

We have a Karaf Camel plugin that allows you to see details about your
Camel apps running in Karaf.
You can read about it here
http://camel.apache.org/karaf.html

So I wonder if your app is similar? But I guess it runs outside Karaf,
eg maybe from standalone Java?

> On 30 September 2011 13:20, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>> On Fri, Sep 30, 2011 at 2:15 PM, Mark <javamark@gmail.com> wrote:
>>> Hi
>>>
>>> I would like to:
>>>
>>> a) Poll a directory
>>> b) Read some meta data about a file in that directory (e.g. length)
>>>
>>> Repeat (infered by the Poll) i.e. just watching out for filemeta data
>>> changing over time.
>>>
>>> I though this would work.
>>>
>>>                        camelContext.addRoutes(new RouteBuilder()
{
>>>                                public void configure() throws
Exception {
>>>                                        from("file://" + HOME_DIR
>>> +"/temp/?noop=true&recursive=true&delay=" + POLL_DELAY)
>>>                                        .process(new MetaConsumerProcessor());
>>>                                }
>>>                        });
>>>
>>> However a file in the directroy "file://" + HOME_DIR +"/temp/" is only
>>> processed once no matter howmany time it is polled.
>>>
>>> Thoughts anyone?
>>>
>>
>> You need to disable idempotent, by setting idempotent=false in the endpoint uri.
>> Then the file ought to be processed over and over again.
>>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message