Skip to content

Instantly share code, notes, and snippets.

@jmkgreen
Created August 12, 2014 13:46
Show Gist options
  • Save jmkgreen/ed271348de66646a87be to your computer and use it in GitHub Desktop.
Save jmkgreen/ed271348de66646a87be to your computer and use it in GitHub Desktop.
Simplest Camel route ever
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.example.camel.test;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
/**
*
*/
public class CamelTest {
public static void main(String[] args) throws Exception {
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("http4://www.google.com?initialDelay=0").log("found google")
.to("file:c:/google");
}
});
context.start();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment