DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Frameworks
  4. Apache Camel 2.18 Release: What's Included

Apache Camel 2.18 Release: What's Included

This week, Apache Camel 2.18.0 was released. This is a significant release. Learn more in this article from Claus Ibsen.

Claus Ibsen user avatar by
Claus Ibsen
·
Oct. 13, 16 · News
Like (4)
Save
Tweet
Share
6.23K Views

Join the DZone community and get the full member experience.

Join For Free

This week, Apache Camel 2.18.0 was released. This is a significant release that I will highlight in this post.

Image title

Java 8

Camel 2.18 is the first release that requires Java 1.8 (it's easy to remember that Camel 2.18 = Java 1.8 and Camel 2.17 = Java 1.7). We have taken a cautious approach and kept the Camel API backwards compatible. As an end user, you can take your existing Camel application source codes and re-compile them with Java 1.8 and Camel 2.18, and you should be all good.

Internally in the Camel source code we have started using Java 8 APIs for new functionality. Existing functionality is still using Java 7 APIs so we can easily backport bug fixes to the older versions.

We have also gently introduced a few Java 8 lambda and functional APIs into the Java RouteBuilder that you can use in predicates and message transformations. You can view a little example at GitHub.

Spring Boot Starters

We had support for Spring Boot since Camel 2.15, but in this release, we have curated all the Camel components to align and make them work as first class Spring Boot starter components. This means you should use -starter as your dependencies, such as camel-kafka-starter.

Spring Boot Auto Configuration

All the Camel components now generate Spring Boot auto configuration source code, which means you can configure components, data formats, languages, etc., using Spring Boot configuration (i.e., in the application.properties file). And on top of that, tooling such as IDEA, Eclipse, etc., which have support for Spring Boot, will have code completions when editing the application.properties file.

Image title

Nicola Ferraro, who helped implement this, posted a blog entry with more details.

Spring Boot Health Check

Apache Camel comes with health check integrated with Spring Boot if you are using actuators. The health check does a coarse grain check that Camel did start up properly. We plan to implement a deeper Health Check API in Camel to allow individual components to participate in the check. For example to check if the component can connect to a remote system and so on.

Wildfly-Swarm Camel

The WildFly Swarm project also has great support for Apache Camel. However, this development happens at the Wildfly-camel project. WildFly-Camel released version 4.3.0 that supports Camel 2.18.0.

Automatic Documentation

I have previously blogged that we are working on keeping and generating the Camel documentation from the source code. This means that every Camel component, EIP, language, data format, etc., all have their options documented in the source code, which we then extract during build to keep the accompanying documentation up to date. We have migrated almost all the documentation from the old wiki system to .adoc files in the source code. We will continue this work to complete this for the next release and will work on building a new website.

As a Camel developer, you may think it's not a big deal, but it really is. This ensures that all options are always 100% up to date in the documentation. It also allows tooling to access this information at both design and runtime. Hawtio can at runtime display deep level information about all your endpoints and include the documentation for each option as shown:
Image title

We also have a Maven plugin that can scan all your source code and report invalid configuring Camel endpoints. This plugin is currently hosted at fabric8, where we can foster innovation faster. However, when the plugin matures, then we plan to donate the source code to Apache Camel project to be included out of the box.

XML XSD Fully Documented

The XML XSD for Spring and Blueprint now also includes documentation for the configuration you can do outside routes, such as on other global configurations.

FluentProducerTemplate

One of the smaller but really lovely new additions is the FluentProducerTemplate, which is using a fluent style API as a client API for sending a message to a Camel endpoint. You can do this nicely with:

template()
   .withBody("Hello World")
   .withHeader("foo", 123)
   .withHeader("bar", 456)
   .to("jms:queue:beer")
   .send();

Rest Producer

The Rest component allows calling REST services now (as a client), where you can pick one of the following Camel components for the HTTP transport: HTTP, http4, netty4-http, Jetty, Restlet, and Undertow. You can also refer to an existing swagger API doc and include camel-swagger-java on the classpath, for automatic validation of the REST endpoint is configured to use a valid REST operation and parameters.

Circuit Break Using Hystrix

We added native support for using Netflix Hystrix as circuit break in your Camel routes. There is an example included.

Below is another example from an example with Spring Boot calling a service running on WildFly Swarm that runs on Kubernetes cluster (or local), which I have been giving talks about recently.

    public void configure() throws Exception {
        from("timer:foo?period=2000")
            .hystrix()
                .to("netty4-http:http://{{service:helloswarm}}/say")
            .onFallback()
                .setBody().constant("Nobody want to talk to me")
            .end()
                .log("${body}");
    }

Zipkin Message Tracing

The release also includes camel-zipkin, which allows the use of Zipkin for distributed message tracing. You can find more details with the provided example.

ServiceCall

The Service Call EIP allows us to call remote services with service discovery from a pluggable service registry. For example, you can use ETDC, Consul, Ribbon, Kubernetes, and others.

New Components

As usual, each release comes with a number of new components:

  • Camel-asterisk for interacting with Asterisk PBX servers.

  • Camel-cm-sms for sending SMS messages using SM SMS Gateway.

  • Camel-consul for integrating your application with Consul.

  • Camel-ehcache - For interacting with Ehcache 3 cache.

  • Camel-flink bridges Camel connectors with Apache Flink tasks.

  • Camel-lumberjack for receiving logs over the lumberjack protocol (used by Filebeat, for instance).

  • Camel-ribbon to use Netflix Ribbon with the Service Call EIP.

  • Camel-servicenow for cloud management with ServiceNow.

  • Camel-telegram for messaging with Telegram.

  • Camel-zipkin for tracking Camel message flows and timings using Zipkin

  • Camel-chronicle for interacting with OpenHFT's chronicle engine.

New Data Formats

And we also have a single new data format:

Camel-johnzon - Apache Johnzon is an implementation of JSR-353 (JavaTM API for JSON processing).

Important Information When Upgrading

Older versions of Spring such as 3.x and 4.0.x have been dropped. OSGi users on ServiceMix or Karaf should also be using Karaf 4.x. It may work on some older Karaf versions, but it's not officially supported.

The next release will drop support for older releases for sure. OSGi users with Spring-DM should install camel-spring-dm module as Spring DM has been removed from camel-spring. Spring Boot 1.4.x is now required.

You can find more details in the Camel release notes.

What's Next

We will work on a Camel 2.19 release where we can further improve on the trajectory the Camel 2.18 release brings us with the new path on Java 8. We also want to finish migrating the documentation and work on a new website. Hopefully, we can also get a nice logo.

Followed by Camel 2.19, we will get started on Camel 3.x. But this will be discussed in the Camel community first. However, for the remainder of this year, we will focus on Camel 2.19, which is planned for the start of Q1 2017.

Spring Framework Release (agency) Apache Camel Spring Boot

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • ChatGPT: The Unexpected API Test Automation Help
  • What Is Policy-as-Code? An Introduction to Open Policy Agent
  • Secrets Management
  • How To Validate Three Common Document Types in Python

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: