= Welcome to the Apache Camel Spring-Boot Examples

== Introduction

This project contains the various examples for working with Apache
Camel Spring Boot. The examples can be run using Maven. When using the Maven
command, Maven will attempt to download the required dependencies from a
central repository to your local repository.
View the individual example READMEs for details.

=== Executing

Master branch should only be used for development purposes, which will be pointing
to the SNAPSHOT version of the next release.

To execute the examples, checkout into the tag for the latest release. For example:

`$ git checkout tags/camel-spring-boot-examples-3.5.0`

Then, install the root pom:

`$ mvn install`

After that, you should be able to execute the examples following each example's
readme's instructions.

=== Examples

// examples: START
Number of Examples: 64 (0 deprecated)

[width="100%",cols="4,2,4",options="header"]
|===
| Example | Category | Description

| link:spring-boot-jta-jpa-autoconfigure/README.adoc[Spring Boot Jta Jpa Autoconfigure] (spring-boot-jta-jpa-autoconfigure) | Advanced | An example showing JTA with Spring Boot Autoconfiguration

| link:spring-boot-jta-jpa-xml/README.adoc[Spring Boot Jta Jpa Xml] (spring-boot-jta-jpa-xml) | Advanced | An example showing JTA with Spring Boot using Spring XML configuration

| link:webhook/README.adoc[Webhook] (webhook) | Advanced | Example on how to use the Camel Webhook component

| link:endpointdsl/README.adoc[Endpointdsl] (endpointdsl) | Beginner | Using type-safe Endpoint DSL

| link:jira/README.adoc[Jira] (jira) | Beginner | An example that uses Jira Camel API

| link:kamelet-chucknorris/README.adoc[Kamelet Chucknorris] (kamelet-chucknorris) | Beginner | How easy it is to create your own Kamelets

| link:load-balancer-eip/README.adoc[Load Balancer Eip] (load-balancer-eip) | Beginner | An example showing Load Balancer EIP with Camel and Spring Boot

| link:pojo/README.adoc[Pojo] (pojo) | Beginner | An example showing how to work with Camel POJO routing with Spring Boot

| link:quartz/README.adoc[Quartz] (quartz) | Beginner | An example showing how to work with Camel Quartz and Camel Log with Spring Boot

| link:rest-openapi-simple/README.adoc[REST OpenApi] (rest-openapi-simple) | Beginner | This example shows how to call a Rest service defined using OpenApi specification

| link:route-reload/README.adoc[Spring Boot Route Reload] (route-reload) | Beginner | Live reload of routes if file is updated and saved

| link:routes-configuration/README.adoc[Routes Configuration] (routes-configuration) | Beginner | Example with global routes configuration for error handling

| link:routetemplate/README.adoc[Routetemplate] (routetemplate) | Beginner | How to use route templates (parameterized routes)

| link:routetemplate-xml/README.adoc[Routetemplate Xml] (routetemplate-xml) | Beginner | How to use route templates (parameterized routes) in XML

| link:splitter-eip/README.adoc[Splitter Eip] (splitter-eip) | Beginner | An example showing Splitter EIP with Camel and Spring Boot

| link:spring-boot/README.adoc[Spring Boot] (spring-boot) | Beginner | An example showing how to work with Camel and Spring Boot

| link:spring-jdbc/README.adoc[Spring Jdbc] (spring-jdbc) | Beginner | Camel transacted routes integrating local Spring Transaction

| link:tomcat-jdbc/README.adoc[Tomcat Jdbc] (tomcat-jdbc) | Beginner | An example showing how to deploy a Camel Spring Boot application in Tomcat using its JDBC Data Source

| link:type-converter/README.adoc[Type Converter] (type-converter) | Beginner | An example showing how to create custom type converter with Camel and Spring Boot

| link:xml/README.adoc[Spring Boot XML] (xml) | Beginner | An example showing how to work with Camel routes in XML files and Spring Boot

| link:xml-import/README.adoc[Spring Boot XML Import] (xml-import) | Beginner | An example showing how to work with Spring XML files imported with embedded CamelContext

| link:aws2-s3/README.adoc[Aws2 S3] (aws2-s3) | Cloud | An example showing the Camel AWS2 S3 component with Spring Boot

| link:azure/camel-example-spring-boot-azure-eventhubs/README.adoc[Spring Boot Azure Eventhubs] (camel-example-spring-boot-azure-eventhubs) | Cloud | An example showing how to work with Camel, Azure Event Hubs and Spring Boot

| link:azure/camel-example-spring-boot-azure-servicebus/README.adoc[Spring Boot Azure Servicebus] (camel-example-spring-boot-azure-servicebus) | Cloud | An example showing how to work with Camel, Azure Service Bus and Spring Boot

| link:infinispan/README.adoc[Infinispan] (infinispan) | Cloud | An example showing the Camel Infinispan component with Spring Boot

| link:master/README.adoc[Master] (master) | Clustering | An example showing how to work with Camel's Master component and Spring Boot

| link:rest-cxf-opentelemetry/README.adoc[Rest Cxf Opentelemetry] (rest-cxf-opentelemetry) | CXF | An example showing Camel REST using CXF and OpenTelemetry with Spring Boot

| link:soap-cxf/README.adoc[Soap Cxf] (soap-cxf) | CXF | An example showing the Camel SOAP CXF

| link:spring-boot-cxf-jaxws/README.adoc[Spring Boot Cxf Jaxws] (spring-boot-cxf-jaxws) | CXF | Spring Boot example running a CXF JAXWS Endpoint

| link:spring-boot-cxf-jaxws-xml/README.adoc[Spring Boot Cxf Jaxws Xml] (spring-boot-cxf-jaxws-xml) | CXF | Spring Boot example running a CXF JAXWS XML Endpoint

| link:multi-datasource-2pc/README.adoc[Multi Datasource 2pc] (multi-datasource-2pc) | Database | An example showing how to work with Camel and Spring Boot using multiple pooled datasources with two-phase commit

| link:resilience4j/README.adoc[Resilience4j] (resilience4j) | EIP | An example showing how to use Resilience4j EIP as circuit breaker in Camel routes

| link:saga/README.adoc[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

| link:fhir/README.adoc[Fhir] (fhir) | Health Care | An example showing how to work with Camel, FHIR and Spring Boot

| link:fhir-auth-tx/README.adoc[Fhir Auth Tx] (fhir-auth-tx) | Health Care | An example showing how to work with Camel, FHIR Authorization, FHIR Transaction and Spring Boot


| link:health-checks/README.adoc[Health Checks] (health-checks) | Health Care | An example on how to work with health checks ib a simple Apache Camel application using Spring Boot.

| link:validator/README.adoc[Validator Spring Boot] (validator) | Input/Output Type Contract | An example showing how to work with declarative validation and Spring Boot

| link:mail-ms-exchange-oauth2/README.adoc[Mail Ms Exchange Oauth2] (mail-ms-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

| link:actuator-http-metrics/README.adoc[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

| link:jolokia/README.adoc[Jolokia] (jolokia) | Management and Monitoring | An example that uses Jolokia to monitor and to manage Camel Routes

| link:monitoring-micrometrics-grafana-prometheus/README.adoc[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

| link:observability-services/README.adoc[Observability Services] | Management and Monitoring | An example showing how to use Camel with Observability Services


| link:opentelemetry/README.adoc[OpenTelemetry] (opentelemetry) | Management and Monitoring | An example showing how to use Camel with OpenTelemetry


| link:supervising-route-controller/README.adoc[Supervising Route Controller] (supervising-route-controller) | Management and Monitoring | An example showing how to work with Camel's Supervising Route Controller and Spring Boot

| link:amq-cert-manager/README.adoc[Amq Cert Manager] (amq-cert-manager) | Messaging | An example showing how to work with Camel, ActiveMQ Amqp and Spring Boot

| link:amqp/README.adoc[Amqp] (amqp) | Messaging | An example showing how to work with Camel, ActiveMQ Amqp and Spring Boot

| link:amqp-salesforce/README.adoc[Amqp Salesforce] (amqp-salesforce) | Messaging | AMQP message sending is created as contacts in Salesforce

| link:artemis/README.adoc[Artemis] (artemis) | Messaging | An example showing how to work with Camel, ActiveMQ Artemis and Spring Boot

| link:kafka-avro/README.adoc[Kafka Avro] (kafka-avro) | Messaging | An example for Kafka avro

| link:kafka-oauth-ocp/README.adoc[Kafka Oauth Ocp] (kafka-oauth-ocp) | Messaging | An example for Kafka on OCP using integrated OAuth

| link:kafka-offsetrepository/README.adoc[Kafka Offsetrepository] (kafka-offsetrepository) | Messaging | An example for Kafka offsetrepository

| link:paho-mqtt5-shared-subscriptions/README.adoc[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

| link:rabbitmq/README.adoc[Rabbitmq] (rabbitmq) | Messaging | An example showing how to work with Camel and RabbitMQ

| link:strimzi/README.adoc[Strimzi] (strimzi) | Messaging | Camel example which a route is defined in XML for Strimzi
        integration on Openshift/Kubernetes


| link:widget-gadget/README.adoc[Widget Gadget] (widget-gadget) | Messaging | The widget and gadget example from EIP book, running on Spring Boot

| link:http-ssl/README.adoc[Http Ssl] (http-ssl) | Rest | An example showing the Camel HTTP component with Spring Boot and SSL

| link:http-streaming/README.adoc[Http Streaming] (http-streaming) | Rest | An example showing large data stream scenario using Camel Platform HTTP component

| link:openapi-contract-first/README.adoc[Openapi Contract First] (openapi-contract-first) | Rest | Contract First OpenAPI example

| link:platform-http/README.adoc[Platform Http] (platform-http) | Rest | An example showing Camel REST DSL with platform HTTP

| link:platform-http-proxy/README.adoc[Platform Http Proxy] (platform-http-proxy) | EIP | An example with Camel Platform HTTP act as reverse proxy

| link:rest-openapi/README.adoc[Rest Openapi] (rest-openapi) | Rest | An example showing Camel REST DSL and OpenApi with Spring Boot

| link:rest-openapi-springdoc/README.adoc[Rest Openapi Springdoc] (rest-openapi-springdoc) | Rest | An example showing Camel REST DSL and OpenApi with a Springdoc UI in a Spring Boot application

| link:rest-spring-security/README.adoc[Rest Spring Security] (rest-spring-security) | Rest | An example showing Camel REST DSL secured with Spring Security and JWT token in a Spring Boot application


| link:salesforce/README.adoc[Salesforce] (salesforce) | SaaS | How to work with Salesforce contacts using REST endpoints and Streaming API
|===
// examples: END


== Deploying the examples in openshift or dev-sandbox using devfiles

=== Pre-requisites

- https://odo.dev/docs/overview/installation[Install odo (Preferred odo version - 2.x)]

=== Steps:

- First login 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

- Create an odo component using the devfile.yaml

        $ odo create csb-ubi8 --app $EXAMPLE

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

        $ odo config set --env SUB_FOLDER=$EXAMPLE

- Then push it to openshift cluster:

        $ odo push

=== Note:

- Only few examples can be deployed using devfile:

        fhir-auth-tx, geocoder, health-checks, kamelet-chucknorris, load-balancer-eip, metrics, paho-mqtt5-shared-subscriptions, pojo, quartz, reactive-streams, rest-jpa, rest-openapi-springdoc,
        rest-openapi, rest-producer, rest-swagger, route-reload, routetemplate, splitter-eip, spring-boot, supervising-route-controller, type-converter, unit-testing, validator, xml-import and xml.

- Please delete `.odo folder` in your repository before starting to deploy another example, so that it will delete the components related to previous example.

- 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/

=== Help and contributions

If you hit any problem using Camel or have some feedback,
then please https://camel.apache.org/support.html[let us know].

We also love contributors,
so https://camel.apache.org/contributing.html[get involved] :-)

The Camel riders!
