Thanks Claus!!!!

On Tue, Aug 9, 2011 at 1:44 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:

> Hi
>
> Ah the issue is when Camel is starting, as the pollEnrich will cause
> the file consumer to start polling. After the first message has been
> processed, the pollEnrich will only run per demand.
>
> I have logged a ticket to track this, so on startup the file consumer
> will not be polling
> https://issues.apache.org/jira/browse/CAMEL-4318
>
> On Mon, Aug 8, 2011 at 12:16 PM, shekher awasthi
>  <shekher.awas...@gmail.com> wrote:
> > I tried the above configuration with apache 2.8 still its working in the
> > same pattern
> >
> >
> >
> from("direct:start").pollEnrich("file:data/csv?fileName=input-customer4.csv"
> > ).to("file:data/csvoutput?fileName=test11.xml");
> >
> > when route is getting executed camel keep polling the location data/csv
> >
> > here is the output from console
> >
> > main] RouteService DEBUG Starting child service on route: route1 ->
> > Channel[PollEnrich[PollingConsumer on
> > Endpoint[file://data/csv?fileName=input-customer4.csv]]]
> >
> > [ main] RouteService DEBUG Starting child service on route: route1 ->
> > PollEnrich[PollingConsumer on
> > Endpoint[file://data/csv?fileName=input-customer4.csv]]
> >
> > [ main] DefaultCamelContext DEBUG Route: route1 >>>
> > EventDrivenConsumerRoute[Endpoint[direct://start] ->
> > Instrumentation:route[UnitOfWork(Channel[PollEnrich[PollingConsumer on
> > Endpoint[file://data/csv?fileName=input-customer4.csv]]])]]
> >
> > [ main] DefaultCamelContext DEBUG Starting consumer (order: 1000) on
> route:
> > route1
> >
> > [ main] DefaultCamelContext INFO Route: route1 started and consuming
> from:
> > Endpoint[direct://start]
> >
> > [ main] DefaultCamelContext INFO Total 1 routes, of which 1 is started.
> >
> > [ main] DefaultCamelContext INFO Apache Camel 2.8.0 (CamelContext:
> camel-1)
> > started in 0.183 seconds
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.004 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > *********************************
> >
> > [ main] DefaultCamelContext INFO Apache Camel 2.8.0
> (CamelContext:camel-1)
> > is shutting down
> >
> > [ main] DefaultShutdownStrategy INFO Starting to graceful shutdown 1
> routes
> > (timeout 300 seconds)
> >
> >
> >
> > is there something i am doing wrong or missing?
> >
> >
> > On Mon, Aug 8, 2011 at 3:16 PM, shekher awasthi
> > <shekher.awas...@gmail.com>wrote:
> >
> >> Thanks Claus!!
> >>
> >> i just read 2.8 release notes :)
> >>
> >>   On Mon, Aug 8, 2011 at 3:07 PM, Claus Ibsen <claus.ib...@gmail.com
> >wrote:
> >>
> >>> On Mon, Aug 8, 2011 at 11:29 AM, shekher awasthi
> >>> <shekher.awas...@gmail.com> wrote:
> >>> > Claus i am  confused  about what is fixed in 2.8 version ?
> >>> >
> >>> > since my problem here is
> >>> >  even i write this line
> >>> >
> >>> >
> >>>
> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
> >>> > camel keep polling data/scv folder till context is not closed.
> >>> >
> >>> > as you mentioned in previous reply the pollEnrich will poll only once
> so
> >>> i
> >>> > am clueless why its polling continuously in my case?
> >>> >
> >>>
> >>> Camel 2.8 fixes pollEnrich keep polling when using file/ftp endpoints.
> >>>
> >>>
> >>> > On Mon, Aug 8, 2011 at 2:53 PM, Claus Ibsen <claus.ib...@gmail.com>
> >>> wrote:
> >>> >
> >>> >> On Mon, Aug 8, 2011 at 11:14 AM, shekher awasthi
> >>> >> <shekher.awas...@gmail.com> wrote:
> >>> >> > i tried something this
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
> >>> >> >
> >>> >> > from("direct:end").unmarshal().csv().bean(*new
> >>> >> > *
> >>> >> >
> >>> >> >
> >>> CSVConverterBean(),"processCSVInvoice").to("xslt:XMLConverter.xsl").to(
> >>> >> > "file:data/csvoutput?fileName=test11.xml");
> >>> >> > still it polling the folder data/csv multiple time
> >>> >> >
> >>> >>
> >>> >> This is fixed in Camel 2.8.0
> >>> >>
> >>> >>
> >>> >> > On Mon, Aug 8, 2011 at 2:04 PM, Claus Ibsen <
> claus.ib...@gmail.com>
> >>> >> wrote:
> >>> >> >
> >>> >> >> Hi
> >>> >> >>
> >>> >> >> You can alternative stop the route from the route. See this FAQ
> >>> >> >> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
> >>> >> >>
> >>> >> >> You may also want to look at the Content Enricher EIP
> >>> >> >> http://camel.apache.org/content-enricher.html
> >>> >> >>
> >>> >> >> Where you can from a route poll the file, using pollEnrich, which
> >>> will
> >>> >> >> poll the file once.
> >>> >> >> This allows you to start the route from a direct consumer or
> >>> something
> >>> >> >> else. And thus only poll the file on demand.
> >>> >> >>
> >>> >> >>
> >>> >> >> On Mon, Aug 8, 2011 at 8:46 AM, shekher awasthi
> >>> >> >> <shekher.awas...@gmail.com> wrote:
> >>> >> >> > Hi All,
> >>> >> >> >
> >>> >> >> > While working around with camel i came across a requirement
> where
> >>> i
> >>> >> need
> >>> >> >> to
> >>> >> >> > pick a file from a directory only when user click on the
> execute
> >>> >> button
> >>> >> >> and
> >>> >> >> > once it has been processed i want to avoid the polling
> >>> >> >> > functionality build in camel
> >>> >> >> >  for e.g
> >>> >> >> > for this route
> >>> >> >> > from("file:data/csv?fileName=input-customer2.csv?noop=true")
> >>> >> >> >
> >>> >> >> > after processing the file camel keep polling data/csv folder
> till
> >>> i am
> >>> >> >> > closing the context which we want to avoid (no idea if this is
> a
> >>> good
> >>> >> >> > approach)
> >>> >> >> > all we want it that once it route executed camel should not
> keep
> >>> >> polling
> >>> >> >> the
> >>> >> >> > location, it should only poll the location when user click a
> >>> button.
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > Thanks in advance
> >>> >> >> > Umesh
> >>> >> >> >
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> --
> >>> >> >> Claus Ibsen
> >>> >> >> -----------------
> >>> >> >> FuseSource
> >>> >> >> Email: cib...@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: cib...@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: cib...@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: cib...@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Reply via email to