Chapter 5. Sample applications


5.1. Spring Boot Examples

The Spring Boot examples repository contains a number of examples on how to integrate with Camel for a variety of use cases. They provide best practice advice and describe common patterns that we see in integration and messaging problems.

The examples can be run using Maven. When using the mvn command, Maven will attempt to download the required dependencies from a central repository to your local repository.

5.2. Examples repository

There are 64 examples:

Expand
ExampleCategoryDescriptionDeploy with devfile

Actuator HTTP Metrics (actuator-http-metrics)

Management and Monitoring

Example on how to use Spring Boot’s Actuator endpoints to gather info like mappings or metrics

No

Amqp (amqp)

Messaging

An example showing how to work with Camel, ActiveMQ Amqp and Spring Boot

No

AMQP Salesforce (amqp-salesforce)

Messaging

AMQP message sending is created as contacts in Salesforce

No

Amq Cert Manager(amq-cert-manager)

Messaging

An example showing how to work with Camel, ActiveMQ Amqp and Spring Boot

No

artemis (artemis)

Messaging

An example showing how to work with Camel, ActiveMQ Artemis and Spring Boot

No

AWS2 S3 (aws2-s3)

Cloud

An example showing the Camel AWS2 S3 component with Spring Boot

No

Azure Event Hubs (azure-eventhubs)

Cloud

An example showing how to work with Camel, Azure Event Hubs and Spring Boot

No

Azure Service Bus (azure-servicebus)

Cloud

An example showing how to work with Camel, Azure Service Bus and Spring Boot

No

Endpoint DSL (camel-example-endpointdsl)

Beginner

Using type-safe Endpoint DSL

No

FHIR (fhir)

Health Care

An example showing how to work with Camel, FHIR and Spring Boot

No

Transaction (fhir-auth-tx)

Health Care

An example showing how to work with Camel, FHIR Authorization, FHIR Transaction and Spring Boot

Yes

Health Checks (health-checks)

Health Care

An example on how to work with health checks ib a simple Apache Camel application using Spring Boot.

Yes

HTTP SSL (http-ssl)

Rest

An example showing the Camel HTTP component with Spring Boot and SSL

No

Http Streaming (http-streaming)

Rest

An example showing large data stream scenario using Camel Platform HTTP component

No

Infinispan (infinispan)

Cloud

An example showing the Camel Infinispan component with Spring Boot

No

Jira (jira)

Beginner

An example that uses Jira Camel API

No

Jolokia (jolokia)

Management and Monitoring

An example that uses Jolokia to monitor and to manage Camel Routes

No

Avro (kafka-avro)

Messaging

An example for Kafka avro

No

Kafka OAuth Ocp (kafka-oauth-ocp)

Messaging

An example for Kafka on OCP using integrated OAuth

No

offsetrepository (kafka-offsetrepository)

Messaging

An example for Kafka offsetrepository

No

Kamelet Chuck Norris (kamelet-chucknorris)

Beginner

How easy it is to create your own Kamelets

Yes

Custom Type Converter (load-balancer-eip)

Beginner

An example showing Load Balancer EIP with Camel and Spring Boot

Yes

Microsoft Exchange Oauth2 Authentication (mail-exchange-oauth2)

Mail

An example showing how to use Camel on Spring Boot to connect with IMAP protocol and access email data for Office 365 users using OAuth2 authentication

No

Master (master)

Clustering

An example showing how to work with Camel’s Master component and Spring Boot

No

Monitoring Micrometrics Grafana Prometheus (monitoring-micrometrics-grafana-prometheus)

Management and Monitoring

Example on how to use Spring Boot’s Actuator endpoints to gather info like mappings or metrics

No

Multiple pooled datasources with two-phase commit (muti-datasources-2pc)

Database

An example showing how to work with Camel and Spring Boot using multiple pooled datasources with two-phase commit

No

Observability Services (observability-services)

Management and Monitoring

An example showing how to use Camel with Observability Services

No

OpenAPI Contract First (openapi-contract-first)

Rest

Contract First OpenAPI example

No

OpenTelemetry (opentelemetry)

Management and Monitoring

An example showing how to use Camel with OpenTelemetry

No

Paho MQTT5 Shared Subscriptions (paho-mqtt5-shared-subscriptions)

Messaging

An example showing how to set up multiple mqtt5 consumers that use shared subscription feature of MQTT5

Yes

REST DSL and Platform HTTP (platform-http)

Rest

An example showing Camel REST DSL with platform HTTP

No

Platform-http Proxy (platform-http-proxy)

EIP

An example with Camel Platform HTTP act as reverse proxy

No

POJO Routing (pojo)

Beginner

An example showing how to work with Camel POJO routing with Spring Boot

Yes

Quartz (quartz)

Beginner

An example showing how to work with Camel Quartz and Camel Log with Spring Boot

Yes

RabbitMQ (rabbitmq)

Messaging

An example showing how to work with Camel and RabbitMQ

No

Resilience4j (resilience4j)

EIP

An example showing how to use Resilience4j EIP as circuit breaker in Camel routes

No

REST using CXF and OpenTelemetry (rest-cxf-opentelemetry)

CXF

An example showing Camel REST using CXF and OpenTelemetry with Spring Boot

No

REST DSL and OpenApi (rest-openapi)

Rest

An example showing Camel REST DSL and OpenApi with Spring Boot

Yes

OpenApi Simple (rest-openapi-simple)

Beginner

This example shows how to call a Rest service defined using OpenApi specification

No

REST DSL and OpenApi (rest-openapi-springdoc)

Rest

An example showing Camel REST DSL and OpenApi with a Springdoc UI in a Spring Boot application

Yes

REST DSL and Spring Security (rest-spring-security)

Rest

An example showing Camel REST DSL secured with Spring Security and JWT token in a Spring Boot application

Yes

Route Reload (route-reload)

Beginner

Live reload of routes if file is updated and saved

Yes

Routes Configuration (routes-configuration)

Beginner

Example with global routes configuration for error handling

No

Route Template (routetemplate)

Beginner

How to use route templates (parameterized routes)

Yes

XML (routetemplate-xml)

Beginner

How to use route templates (parameterized routes) in XML

No

Saga (saga)

EIP

This example shows how to work with a simple Apache Camel application using Spring Boot and Narayana LRA Coordinator to manage distributed actions implementing SAGA pattern

No

Salesforce (salesforce)

SaaS

How to work with Salesforce contacts using REST endpoints and Streaming API

No

SOAP CXF (soap-cxf)

CXF

An example showing the Camel SOAP CXF

No

Camel Splitter EIP (splitter-eip)

Beginner

An example showing Splitter EIP with Camel and Spring Boot

Yes

Spring Boot (camel-example-spring-boot)

Beginner

An example showing how to work with Camel and Spring Boot

No

Spring Boot Cxf Jaxws (spring-boot-cxf-jaxws)

CXF

Spring Boot example running a CXF JAXWS Endpoint

No

Spring Boot Cxf Jaxws XML (spring-boot-cxf-jaxws-xml)

CXF

Spring Boot example running a CXF JAXWS XML Endpoint

No

JTA (spring-boot-jta-jpa-autoconfigure)

Advanced

An example showing JTA with Spring Boot Autoconfiguration

No

JTA (spring-boot-jta-jpa-xml)

Advanced

An example showing JTA with Spring Boot using Spring XML configuration

No

Spring JDBC (spring-jdbc)

Beginner

Camel transacted routes integrating local Spring Transaction

No

Strimzi (strimzi)

Messaging

Camel example which a route is defined in XML for Strimzi integration on Openshift/Kubernetes

No

Supervising Route Controller (supervising-route-controller)

Management and Monitoring

An example showing how to work with Camel’s Supervising Route Controller and Spring Boot

Yes

Tomcat JDBC (camel-example-spring-boot)

Beginner

An example showing how to deploy a Camel Spring Boot application in Tomcat using its JDBC Data Source

No

Custom Type Converter (type-converter)

Beginner

An example showing how to create custom type converter with Camel and Spring Boot

Yes

Validator (validator)

Input/Output Type Contract

An example showing how to work with declarative validation and Spring Boot

Yes

Webhook (webhook)

Advanced

Example on how to use the Camel Webhook component

No

Widget Gadget (widget-gadget)

Messaging

The widget and gadget example from EIP book, running on Spring Boot

No

XML (xml)

Beginner

An example showing how to work with Camel routes in XML files and Spring Boot

Yes

XML Import (xml-import)

Beginner

An example showing how to work with Spring XML files imported with embedded CamelContext

Yes

5.3. Running Examples

You should always use the latest release for the examples.

To run the examples:

  1. Check out the tag for the latest release (currently camel-spring-boot-examples-4.14.4.redhat-00001):

    $ git checkout tags/camel-spring-boot-examples-4.14.4.redhat-00001

  2. Install the root pom:

    $ mvn install

  3. Check the README for the example you want to run for additional steps.

5.4. Deploying examples

You can deploy examples in OpenShift or dev-sandbox using devfiles. For more information about deploying the Camel Spring Boot applications on OpenShift Container Platform, see Apache Camel on OCP Best practices.

Note

Only some of the examples can be deployed with devfile. See the column "Deploy with devfile" in the examples table.

Prerequisites

  1. If you haven’t already, install odo (We recommend version 2.x)

Procedure

  1. Log in to your openshift or dev-sandbox and create a new project. Here $EXAMPLE is the name of the example you want to deploy:

    $ oc new-project csbex-$EXAMPLE

  2. Create an odo component using the devfile.yaml

    $ odo create csb-ubi8 --app $EXAMPLE

  3. To set the specific example you want to deploy as an env variable (SUB_FOLDER):

    $ odo config set --env SUB_FOLDER=$EXAMPLE

  4. Then push it to openshift cluster:

    $ odo push

  5. Before you deploy an example, delete the .odo directory in your repository.

    This removes components related to any previous example.

  6. If you have an internal repository, set the MAVEN_MIRROR_URL environment with your maven repo before pushing:

    $ odo config set --env MAVEN_MIRROR_URL=https://my-maven-mirror/

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top