Hello everyone, In this post, you will learn Simple Hello World in Apache Camel. The example has been tested and shared in the post.

Maven Dependency


Camel Router

package com.dineshkrish.example1;
import org.apache.camel.builder.RouteBuilder;
* @author Dinesh Krishnan
public class HelloWorldRouter extends RouteBuilder {
public void configure() throws Exception {
// implementation goes here
System.out.println("Hello World...");

Final Program

package com.dineshkrish.example1;
import org.apache.camel.CamelContext;
import org.apache.camel.impl.DefaultCamelContext;
* @author Dinesh Krishnan
public class HelloWorldCamel {
public static void main(String[] args) {
// creating an instance for camel context
CamelContext context = new DefaultCamelContext();
// creating an instance for router
HelloWorldRouter router = new HelloWorldRouter();
try {
// adding router to context
// starting the camel context
// stopping the camel context
} catch (Exception e) {


SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Hello World...

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *