Integration Processes

Introduction to Camel breeding


María Arias de Reyna

@delawen at Logo-RedHat-A-Color-RGB

I am going to talk about

Open Source
Integration Frameworks for
IPaaS
on Hybrid Platforms
using EIP
#Buzzword #Buzzword
#Buzzword #Buzzword for
#Buzzword
on #Buzzword #Buzzword
using #Buzzword
Framework for Data Workflows #Buzzword for #Buzzword #Buzzword MOVING DATA BETWEEN COMPONENTS

Enterprise Integration Patterns


Logo-RedHat-A-Color-RGB

Let's focus on:


- low level (code)

- high level (UI)

Apache Camel

One of the most active Apache Project

300+ components

Runs over Java:

Plain Java , Spring Boot , Kubernetes (Quarkus)

Apache Camel

is NOT:

A connector library

is:

A framework to create data workflows, including a connector library, a conversor library and a router

...and all this in less than 5 megas

              
                //Run this workflow every five seconds
                from("timer:hello?period=5s")
                  //Log a simple hello
                  .log("Hello FOSDEM")
                  //Send message to mock endpoint
                  .to("mock:foo")
                  //Log something more to mark end
                    .log("How are you?")
              
              
                kamel run fosdem.js 
                kamel log fosdem
                kamel delete fosdem
              
            

Let's launch a kafka stream

Instructions to install Kafka

              
                oc -n kamel run kafka-producer -ti \
                --image=strimzi/kafka:0.16.1-kafka-2.4.0 \
                --rm=true --restart=Never \
                -- bin/kafka-console-producer.sh \
                --broker-list my-cluster-kafka-bootstrap:9092 \
                --topic fosdem2020 
              
            

We can check it is working

              
                oc -n kamel run kafka-consumer -ti \
                --image=strimzi/kafka:0.16.1-kafka-2.4.0 \
                --rm=true --restart=Never -- bin/kafka-console-consumer.sh \
                --bootstrap-server my-cluster-kafka-bootstrap:9092 \
                --topic fosdem2020 --from-beginning
              
            
              
                from("kafka:fosdem2020?brokers=my-cluster-kafka-bootstrap:9092")
                  .log("Message received from Kafka : ${body}")
                  .log("    on the topic ${headers[kafka.TOPIC]}")
                  .log("    with the offset ${headers[kafka.OFFSET]}")
              
              
                kamel run fosdem.js 
                kamel log fosdem
                kamel delete fosdem
              
            
              
                from("kafka:fosdem2020?brokers=my-cluster-kafka-bootstrap:9092")
                  .choice()
                     .when(simple("'${body}' ends with '!'"))
                      .log("We are excited! ${body}")
                     .otherwise()
                      .log("We are sad. ${body}")
              
              
                kamel run fosdem.js 
                kamel log fosdem
                kamel delete fosdem
              
            
              
                from("kafka:fosdem2020?brokers=my-cluster-kafka-bootstrap:9092")
                  .choice()
                     .when(simple("${body} ends with '!'"))
                      .log("We are excited! ${body}")
                     .otherwise()
                      .setBody(body().append(" !!!!!"))
                      .setHeader("KAFKA_CAMEL", constant("FOSDEM"))
                      .to("kafka:fosdem2020?brokers=my-cluster-kafka-bootstrap:9092")

              
              
                kamel run fosdem.js 
                kamel log fosdem
                kamel delete fosdem
              
            

Do I have to code? Can I use only Java?

You want a non Java solution?

              
                 
                   
                     
                     
                     
                   
                 
              
            

We have XML

Is there no UI for dummies?

Do I have to understand all this to use it?

Is there a non-developer way?

(Or a way for developers that want to make their lives easier)

Demo time!

I talked about


Open Source

Integration Frameworks

for IPaaS

on Hybrid Platforms

using EIP

Flashing News!

Working on some specific spatial connectors.

Helping hands welcome!