@Override public void configure() throws Exception { from("timer:foo?period=5s") .log("I am running."); } }
@Override public void configure() throws Exception { from("timer:foo?period=1000").log("I am running"); } });
@Override public void configure() throws Exception { // run this route once per minute between 08-18 hours on every day the week from("quartz2:myGroup/myTrigger?cron=0+0/1+08-18+?+*+*") // just log when the job was fired .log(name + " running at ${header.fireTime}"); }
@Override public void configure() throws Exception { from("timer://helloTimer?fixedRate=true&period=10000"). routeId("Hello " + name). log(greeting + " " + name); } };
@Override public void configure() throws Exception { from("timer:foo?period=2000") .to("http4://0.0.0.0:8080") .log("${body}"); } }
@Override public void configure() throws Exception { from("timer:foo?period=2000") // need to use the IP address of the wildfly-swarm application .to("http4://{{swarm.ip}}:8080") .log("${body}"); } }
@Override public void configure() throws Exception { // trigger the route every 5th second from("timer:foo?period=5s") // call the hello bean say method .beanRef("hello", "say") // log the response from the bean .log("${body}"); } }
@Override public void configure() { from("file:target/input?delay=1s") .log("Sending message [${body}] to JMS...") .to("sjms:queue:output"); } }
@Override public void configure() { from("file:target/input?delay=1s") .log("Sending message [${body}] to JMS ...") .to("sjms:queue:output"); } });
@Override public void configure() throws Exception { from("timer:trigger?period=2000") .serviceCall("hello-service/camel/hello") .log("Response ${body}"); } }
/** * receives JMS message. * * @throws Exception * Persistence error */ @Override public void configure() throws Exception { from("properties:{{helloApp.inQueueJMS}}"/* "jms:queue:helloServiceQueueIn" */) .log(LoggingLevel.INFO, "received jms message: ${body}").unmarshal(this.helloObjectJSonFormat) .process(exchange -> HelloServiceJMS.this.persistHello((HelloEntity) exchange.getIn().getBody())); }
@Bean public RouteDefinition two() { return SyndesisExtensionRoute.from("direct:two") .routeId("extension-two") .log("two"); } }
@Override public void doConfigure() throws Exception { from("servlet:///ping?servletName=" + CAMEL_SERVLET) .routeId(ROUTE_ID_PING) .log(LoggingLevel.INFO, "Incoming PING request ... ") .transform(constant("PONG\n")); } }
@Bean public RouteDefinition one() { return SyndesisExtensionRoute.from("direct:one") .routeId("extension-one") .log("one"); }
@Bean public RouteDefinition two() { return SyndesisExtensionRoute.from("direct:two") .routeId("extension-two") .log("two"); } }
@Bean public RouteDefinition one() { return SyndesisExtensionRoute.from("direct:one") .routeId("extension-one") .log("one"); }
@Override public void configure() throws Exception { // read files from the shared directory from("file:target/inbox" + "?delete=true") // setup route policy to be used .routePolicyRef("myPolicy") .log(name + " - Received file: ${file:name}") .delay(delay) .log(name + " - Done file: ${file:name}") .to("file:target/outbox"); }
@Override public void configure() throws Exception { // read files from the shared directory from("file:target/inbox" + "?delete=true") // setup route policy to be used .routePolicyRef("myPolicy") .log(name + " - Received file: ${file:name}") .delay(delay) .log(name + " - Done file: ${file:name}") .to("file:target/outbox"); }
@Override public void configure() throws Exception { // read files from the shared directory from("file:target/inbox" + "?delete=true") // setup route policy to be used .routePolicyRef("myPolicy") .log(name + " - Received file: ${file:name}") .delay(delay) .log(name + " - Done file: ${file:name}") .to("file:target/outbox"); }
@Override public void configure() throws Exception { // HTTP service fromF("jetty:http://localhost:" + port) // increase the atomic clustered counter from the hazelcast cache .setHeader(HazelcastConstants.OBJECT_ID, constant("myCounter")) .to("hazelcast:atomicvalue:Cache?hazelcastInstance=#hz&defaultOperation=increment") // prepare http response .log(name + ": counter is now ${body}") .setHeader(Exchange.CONTENT_TYPE, constant("text/plain")) .transform().simple("Atomic Counter is now ${body}\n"); }