Skip to content

An example application that when Apache Camel meets Spring / Spring Boot

License

Notifications You must be signed in to change notification settings

TerrenceMiao/camel-spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Camel Spring

Build Status Code Coverage Docker Pulls Join%20Chat

When Camel meets Spring is a sample demonstrating how Apache Camel works with Spring Boot, with hawtio http://hawt.io/getstarted/, a modular web console let you manage, monitor your Java stuff. Check:

Development

  • Ready, Set, Go

$ $GRADLE_HOME/bin/gradle --parallel --max-workers=2 clean build

$ $GRADLE_HOME/bin/gradle bootRun

$ $GRADLE_HOME/bin/gradle bootRun --debug-jvm

$ SERVER_PORT=8081 $GRADLE_HOME/bin/gradle bootRun

$ SPRING_PROFILES_ACTIVE=default $GRADLE_HOME/bin/gradle bootRun

$ SPRING_PROFILES_ACTIVE=elk $GRADLE_HOME/bin/gradle bootRun

$ $JAVA_HOME/bin/java -jar build/libs/camel-spring-1.0-SNAPSHOT.jar

In Fish shell, run like

𝜆 env server.port=8081 $GRADLE_HOME/bin/gradle bootRun

𝜆 env spring.profiles.active=default $GRADLE_HOME/bin/gradle bootRun

𝜆 env spring.profiles.active=elk $GRADLE_HOME/bin/gradle bootRun

Zipkin Tracing

Start Open Zipkin Tracing server

$ docker run -d --name zipkin -p 9411:9411 openzipkin/zipkin

$ $GRADLE_HOME/bin/gradle bootRun

Then in Camel Spring to produce a PDF file, and go to URL: http://localhost:9411/

Zipkin Tracing console

Logging with ELK (Elastic, Logstash and Kibana)

Install and Run Elastic, Logstash and Kibana

𝜆 /usr/local/elasticsearch/bin/elasticsearch

𝜆 /usr/local/kibana/bin/kibana

𝜆 cat /usr/local/logstash/logstash-json.conf
input {
    tcp {
        port => 4560
        codec => json_lines
    }
}

output {
    elasticsearch { hosts => ["localhost:9200"] }
    stdout { codec => rubydebug }
}

𝜆 /usr/local/logstash/bin/logstash -f /usr/local/logstash/logstash-json.conf

𝜆 env spring.profiles.active=production $GRADLE_HOME/bin/gradle bootRun
Kibana Console

References

Copying

Copyright © 2016 - Terrence Miao. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3).

About

An example application that when Apache Camel meets Spring / Spring Boot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages