camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shekher awasthi <shekher.awas...@gmail.com>
Subject Re: Overriding ScheduledPollConsumer
Date Mon, 08 Aug 2011 09:14:25 GMT
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

On Mon, Aug 8, 2011 at 2:04 PM, Claus Ibsen <claus.ibsen@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.awasthi@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: 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message