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: Problem with HTTP endpoint
Date Mon, 24 Dec 2012 07:33:59 GMT
On Sun, Dec 23, 2012 at 4:38 PM, Meriem <mbenhaddi@gmail.com> wrote:
> Hi,
> It was effectively the bad version of camel-http.jar, thanks for the reply.
> I switched to camel-http-2.9.0.jar and it worked.
> But it continue to pull data from the http endpoint (www.google.com)
> endlessly, so with this code :
>
> from("http://google.com").to("file:target/messages");
>
> it continue to create files where it puts the result of the request.
>
> How can I tell it to pull the data only one time, and how to specify a name
> for the created file; in fact, the created file's name is something like:
> ID-MERIEM-54264-1356275725253-0-5.
>

You can start the route from a timer / quartz etc  to trigger a route
to run only once or X period

from timer
  to http
  to file

http://camel.apache.org/timer
http://camel.apache.org/quartz

And to specify a file name then you need to set the Exchange.FILE_NAME
header with the name you want.
There should be some samples and more details at
http://camel.apache.org/file2




> Thank you very much for your help.
> Best,
> Meriem.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Problem-with-HTTP-endpoint-tp5724441p5724565.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message