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)

And some more alternative methods:

  • Adding Camel to an existing project

  • Using IDE tooling wizards

  • Using UI tooling with visual designers

  • Using Maven Archetypes

  • Cloning an existing example to modify

Using online Project generators

You can 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

First install JBang according to your platform.

Once JBang is installed, you should be able to make sure it works by calling the version command:

$ jbang version
0.132.1

After this then install Camel into JBang as follows:

$ jbang app install camel@apache/camel

Then you can check that Camel is installed and working by executing:

$ camel version
JBang version: 0.132.1
Camel JBang version: 4.16.0

Step 2

Create your first Camel integration

$ camel init hello.yaml
You can also use Java or XML instead of YAML. For example camel init hi.java.

Step 3

Run the Camel integration

$ camel run hello.yaml

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.yaml --dev

While in live coding mode, whenever you save changes to hello.yaml, 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.

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 UI tooling with visual designers

There are a number of UI designers for Apache Camel that can help you get familiar with Camel, and provide clarification on what you can do with Camel.

Among others the following are open source and provide support for official Apache Camel distributions:

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.