Getting Started

You can get started with Apache Camel in a variety of ways, such as:

  • Using online Project generators

  • Using the Camel CLI (command line)

  • Using Camel Karavan (visual UI Camel designer)

And some more alternative methods:

  • Adding Camel to an existing project

  • Using IDE tooling wizards

  • Using Maven Archetypes

  • Cloning an existing example to modify

Using online Project generators

You can use Camel Kameleon which is Camel’s own online project generator. This generator is Camel focused only, which is recommended for most Camel users.

You can also use Spring Boot Initializer which is the Spring Boot generator that also has Camel support. However, this generator does not allow users to have fine-grained control over which components, data formats, kamelets etc. they can use.

And there is Code with Quarkus, the Quarkus generator, which has great support with Camel.

Getting Started from command line (CLI)

Camel uses JBang for the Camel CLI. You can easily get up and running in a few steps.

Step 1

Open your favorite terminal and use JBang to install the Camel CLI. You do not need to have Java installed first.

For Linux, macOS, and Windows (using WSL or bash compatible shell like Cygwin or MinGW)

curl -Ls https://sh.jbang.dev | bash -s - trust add https://github.com/apache/
curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force camel@apache/camel

For Windows using Powershell

iex "& { $(iwr https://ps.jbang.dev) } trust add https://github.com/apache/"
iex "& { $(iwr https://ps.jbang.dev) } app install --fresh --force camel@apache/camel"

If it’s your first time to install, you’ll need to restart your shell.

Step 2

Create your first Camel integration

camel init hello.java

Step 3

Run the Camel integration

camel run hello.java

Bang the Camel integration is now running. You can use ctrl + c to stop the integration.

Step 4

Camel makes it easy to change your code on the fly. You can run in live coding mode, as shown:

camel run hello.java --dev

While in live coding mode, whenever you save changes to hello.java, Camel will automatically load the updated version.

Step 5

Make sure to check out the Camel JBang documentation, for more details on the powers of the Camel CLI. You will also find information how you can export what you have built with the Camel CLI into a vanilla Camel Spring Boot or Camel Quarkus project.

Getting started with Camel using Karavan

The Camel Karavan is a toolkit for visually designing Camel integrations, it is fully integrated with Camel JBang which allows users to easily try Camel while using the designer.

Alternative ways of getting started with Camel

Adding Camel to an existing project

You can add Camel to any Java project, such as adding the necessary Camel dependencies to the project build files (Maven or Gradle).

Using IDE tooling wizards

Some IDEs have wizards for creating new projects, of which, some have support for Apache Camel via Spring Boot Initializer or Code with Quarkus.

Using Maven Archetypes

Apache Camel comes with a set of Camel Maven Archetypes, you can use to create a new Camel project.

Cloning an existing example to modify

There are tons of Camel examples hosted on Github that you can clone and modify, such as Camel Spring Boot examples.