What I still don“t understand. What is the difference between the jetty and the http component and why are both needed? Normally I would have thought the jetty component hosts a server that can be used to trigger a camel route from the outside. But in the example you used it to extract data from an external page. Am I missing something here?

Greetings

Christian

Claus Ibsen schrieb:
Hi

Ah the issue is that the Jetty component is an EventDrivenConsumer and not 
Scheduled. So you have to trigger the event yourself to start the event in 
jetty.

Eg:
from("timer://foo?fixedRate=true&delay=0&period=10000").to("jetty:http://www.google.com";).setHeader(FileComponent.HEADER_FILE_NAME,
 "message.txt").to("file:target/hello");

This will invoke the google homepage every 10th second and store it as a file.

http://activemq.apache.org/camel/event-driven-consumer.html


Med venlig hilsen
Claus Ibsen

Reply via email to