Skip to content

Instantly share code, notes, and snippets.

@GuilhermeManzano
Created December 18, 2020 01:27
Show Gist options
  • Save GuilhermeManzano/8933234a198c53dc4b1cb9c444c0b33a to your computer and use it in GitHub Desktop.
Save GuilhermeManzano/8933234a198c53dc4b1cb9c444c0b33a to your computer and use it in GitHub Desktop.
public class RotaPedidos {
public static void main(String[] args) throws Exception {
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder()) {
@Override
public void configure() throws Exception {
from("file:pedidos?delay=5s")
.log("${id}")
.to("file:saida);
}
});
context.start();
Thread.sleep(20000);
context.stop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment