Great podcast about Apache Camel from Java Pub House

Recently I listened to a podcast from Java Pub House posted on 7th of January 2017 where Freddy Guime and Bob Hollin talk about Apache Camel.

Episode 62. Hm, what's the best to travel this holiday? on Apache CAMEL, of course!

Freddy is new to Apache Camel, and Bob an experience user. I enjoyed listening to the podcast where they talk about what Camel is, where you can use Camel, and where you should not use Camel etc.

Freddy is good at asking all the right questions which new users would have, and together they are great at coming to good answers.

Bob also shares from his wisdom and experience with using Camel. So you get all the good, bad and ugly of Camel from real war stories.

If you have some time to spare then I recommend listening.

The podcast is episode and the link is up there in the top of this blog.


Apache Camel 2016 Numbers

Its been 5 years since I last did a blog post about the Camel numbers.

Just to do a quick post on some of the numbers for the Apache Camel project in year 2016.

Number of releases in 2016: 12
Number of posts on Camel user forum in 2016: 5423
Number of commits in 2016: 4325 (git shortlog -ns --since 2016-01-01 | cut -c1-7 | awk '{ SUM += $1} END { print SUM }')

Total number of tickets created at end of 2016: 10663
Number of tickets created in 2016: 1192
Number of tickets resolved in 2016: 1256

Total number of commits at end of 2016: 26390
Number of stars on github at end of 2016: 1149
Total number of contributors on github at end of 2016: 267
Number of closed pull requests at end of 2016: 1363
Number of closed pull requests in 2016: 615
Number of committers doing commits in 2016: 192 (git shortlog --after 2015-12-31 --before 2017-01-01 -ns | wc -l).

You can find more statistics at github and Open Hub.

Happy New Year and 2017 is going to be a special year for Apache Camel.


Work started on Apache Camel Intellij IDEA plugin

Just because its Christmas does not mean the Camel stands still.

On the even of the 23rd I took the evening to do a bit of research and start hack on a little prototype for an Apache Camel plugin for IDEA. Its something that has been on my radar for a longer time. 

The reason is that Apache Camel provides a catalog with has a ton of great information for tooling. The catalog includes every little detail about every Camel component, EIPs, data formats, languages, and much more.

I have long wanted to have a little plugin for IDEA (and also Eclipse if possible) for code assistance to setup Camel endpoints - in other words, having ctrl + space to show a list of Camel options you can use on any given Camel endpoint.

Sidestory begins ...
So in the darkness of the night I found myself back in Intellij IDEA plugin land. It was a long long time since last time I hacked on a IDEA plugin. It was so many years ago I cannot remember exactly, but it was around 2002. I created a little plugin called Generate toString which would generate nice toString methods for your POJO classes, like you can generte equals/hashCode etc. Over the years that followed I maintained the plugin and upgraded it for newer IDEA versions which would often break the plugin, or they have moved/changed their APIs. Back then the plugin API was hardly documented, and there was no source code of the editor itself, so it was no fun to try to figure out how to get it to work again, or how to use some of  the existing IDEA dialogs etc. But in the end it was possible, and for a few dialogs I actually had to build it myself using Java Swing etc. The plugin later found a new home at Jetbrains where they took over and provides the plugin out of the box in IDEA. Thanks Jetbrains. You make the best editor on the planet. 
You can read more about this story in the following blog posts: Fast forward to 2016 and I was back in somewhat familiar waters, the AST model is still named PsiSomething.
... sidestory ends.

However doing a plugin that hooks into the Java language of IDEA took a while to find out, because I was walking down the wrong path, trying to find an extension-point about smart completion. 

So instead I looked at some of the out of the box plugins as you can find their source code, and eventually found a plugin that hook into the Java language which took me down the right path.

So after a while I got something working, which was marvelous to see that the smart completion suggestion list included the Camel endpoint options for the given component.

On christmas morning I hacked some more, and posted a tweet with the first screenshot

Today on the 25th December I do have a bit more time as well to polish up the code and to publish it on github. 

I have created a new project on github where we can hack on the code to make the plugin awesome and great. The intention is that the code eventually will be donated to Apache Camel. But for now we can keep it separated so its easier because there is only the plugin code, and not all the other Camel source as well.

You can find more details on the github page, where there is instructions how to try / run and build the plugin. There is also a issue tracker with tickets for stuff we need to work on.

Anyone is welcome to help with the plugin.

Sadly I don't have so much time currently to justify spending days hacking on the plugin, even thought it would be really fun. I have to focus on completing the Camel in Action 2nd edition book. I am 85% complete with the microservices chapter, and then have another chapter to complete as soon as possible in the start of 2017. However I am also a human whom want to have a bit fun hacking so I will hack a bit from time to time on the plugin.

A shameless plug for the book, there is a 40% discount code during the holidays.

The discount code is camiach(40% off Camel in Action, Second Edition, all formats, expiration: January 7, 2017)

To finish this blog post here are the latest screenshot of the Camel IDEA plugin in action:
Smart completion to present possible Camel options

The plugin also supports smart completion for the values, for example an enum based option shows which choices there are (and which one is the default if there is a default value)

Smart completion for enum values


Status of Camel in Action 2nd edition book

Jonathan and I just wanted to give an update on the status of the book, now that we are entering 2017 which will be the year the book is finished. Before summer 2017 we all have the final book in our hands.

Manning have told us the book is doing well, and they have granted us with a special x-mas holiday promotion code.

The discount code is camiach (40% off Camel in Action, Second Edition, all formats, expiration: January 7, 2017)

Yesterday we send out the following letter to our readers of the Camel in Action 2nd edition book.

Dear Reader,

2016 is coming to an end and we are well aware that we need to hurry up and complete the remaining chapters.

Claus has been busy of late with personal "stuff" which has taken away time and energy that he would otherwise have put toward the book. However the "stuff" is clearing up and he has free time to get back in the saddle and into the writing zone. He is on track with the popular microservices chapter that will be ready in the beginning of 2017.

Jonathan is closing in on having chapter 15 ready as well for the beginning of 2017 where a new MEAP update can be expected.

Then there are two more chapters scheduled. Claus will work on a container chapter that covers all the exciting new technologies with containers, Docker, Kubernetes, cloud, and so on.

We are very pleased that Henryk Konsek has agreed to be our guest author on a chapter about Camel and IoT.

We are revising the TOC and have decided to fold chapter 17 and 18 together into a single chapter about Camel, containers, and cloud where clustering is natural. This also means there is one less chapter and the book will be finished sooner.

After all the chapters are complete, we will revise every single chapter with all the feedback from the reviews and from our technical editors. So expect the material to sharpen up, and be much more fluent and pleasant to read when the proof editors have done their magic.

Kind regards,

Jonathan and Claus


Camel Live Reload of XML routes

Its been a while since I last did a Camel video. So today I recorded a video of the upcoming live reload functionality in Camel 2.19.

You can now enable live reload of your Camel XML routes which will trigger a reload on-the-fly whenever you save the XML file from your editor.

This is demonstrated in the short 5 minute video.

You can use the Camel live reload easily when using:

  • Camel standalone with Camel Main class
  • Camel Spring Boot
  • From the camel:run maven plugin

And for other use-cases you can enable this manually be setting a ReloadStrategy on the CamelContext. We provide the FileWatcherReloadStrategy out of the box, which is what is used above as well. However the idea is that end users can provide their own custom strategies as well.

We ship two examples out of the box which you can look at and try for yourself


Camel Maven Plugin can now parse your source code and report invalid endpoints

I have previously blogged about the fabric8 Camel Maven Plugin which is able to parse your source code and parse all the Java RouteBuilder and XML routes and report invalid Camel endpoints.

That was in the start of 2016. Now at the end of 2016, the code has stabilized and the fabric8 team has gracefully donated the source to to ASF so it will be included out of the box from Apache Camel 2.19.0 onwards.

To see the plugin in action you can watch the video from my previous blog. The plugin would work the same when its from Apache Camel.

To give a demonstration of the plugin, I have modified the camel-example-twitter-websocket example from Apache Camel to make some invalid configurations:

- Renamed the polling to poling in the twitter endpoint
- Added foo=bar as option to the log endpoint
- Spelt the sendToAll option with a lower case a.

And when I run the plugin I see

mvn camel:validate

Then Maven outputs:

[INFO] --- camel-maven-plugin:2.19.0-SNAPSHOT:validate (default-cli) @ camel-example-twitter-websocket ---
[INFO] Using Camel version: 2.19.0-SNAPSHOT
[WARNING] Endpoint validation error at: org.apache.camel.example.websocket.TwitterWebSocketRoute.configure(TwitterWebSocketRoute.java:109)


                   type    Invalid enum value: poling. Possible values: [polling, direct, event]. Did you mean: [polling]. Default value: direct

[WARNING] Endpoint validation error at: org.apache.camel.example.websocket.TwitterWebSocketRoute.configure(TwitterWebSocketRoute.java:110)


                    foo    Unknown option

[WARNING] Endpoint validation error at: org.apache.camel.example.websocket.TwitterWebSocketRoute.configure(TwitterWebSocketRoute.java:112)


              sendToall    Unknown option. Did you mean: [sendToAll]

[WARNING] Endpoint validation error: (0 = passed, 3 = invalid, 0 = incapable, 0 = unknown components)
[INFO] Simple validation success: (0 = passed, 0 = invalid)
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------

As you can see it discovered 3 invalid endpoints, and reported suggestions what is the error.

By default the maven goal does not fail maven itself, and hence why you see BUILD SUCCESS. The plugin has a number of options you can configure.

For more information see the Camel Maven Plugin documentation.

PS: The plugin also parses your Simple expressions and report invalid configurations as well.

We may in the future add parsers for other languages so we can parse XPath, XQuery, Groovy and others.


Back from ApacheCon Sevilla 2016

This week I attended my first (but not my last) ApacheCon in Sevilla Spain. The event is co-hosted with Apache Big Data that runs monday and Tuesday and then ApacheCon from Wednesday till friday. I had the opportunity to travel to Sevilla on monday, and therefore had Tuesday as full day for sight seeing and attending a few talks at Apache Big Data.

Fellow Camel rider Jean Baptiste co-presented Apache Beam which seems like a really interesting project. It provides an unified API and DSL on top of various big data implementations such as Apache Flink, Hadoop, Storm, and what else is out there. I talked to Jean about a potential integration between Beam and Camel. It would open up the number of systems that Beam could ingest data from using the many Camel components.

In the hallway I meet Krzysztof Sobkowiak from the Apache ServiceMix project, so we took the opportunity to take a selfie. Kudos to Krzysztof for getting involved with ServiceMix so this project can get some releases out the door from time to time.

In the afternoon I went for sightseeing and I must say Seville is a beautiful city with parks, historical buildings, big cathedral and a bull fighter arena. All within walking distance in the city center.

The Plaza de Espana is particular impressive (see link on wikipedia for more impressive photos). Supposedly some footage of Star Wars and Game of Thromes was filmed there.

A friend of mine had be in Sevilla before and he told me about the many citrus trees in the streets, which was not so hard to find.

Citrus trees in the streets of Sevilla

On thursday I kicked off a series of Apache Camel talk. My talk was an introiuctinary talk as there is still many people who are not aware of Apache Camel - even at ApacheCon. However my first thought was that everybody knew Camel and people wanted to sleep in, as 10 minutes before my talk the room was empty.

Spanish way of life with siesta - 10 minutes before my talk

However people turned up and the room was half full and about 1/3 already knew Camel, so I was a on a mission to spread the word about Apache Camel.

Thanks Bilgin for the photo of me during my presentation
You can find slides to my talk at my slideshare account.

The following speaker Dzmitry Pletnikau talked about how his company are using Camel since 2013 in the real world as a non Java shop. It was interesting to hear how much they can do with Camel XML and a ServiceMix container running in docker so developers dont need any Java installed locally and just drop/edit an XML file.

Dzmitry Pletnikau speaking about Camel

Then Colm from Talend talked about the Apache Syncope (identity management) project and how they have integrated with Apache Camel that adds a lot of power to what you can do.

Colm about to start his presentation (sorry the photo is a little blurred)
The last Camel talk of the day was Bilgin Ibryam whom talked about cloud native Camel design patterns.

Bilgin about to start his presentation

Bilgin whom authored the awesome book Camel Design Patterns gave an excellent presentation where he talked about the implications and also new possibilities that the container world brings to the table. One of his slides had a great summary of integration patterns evolving.

How are integration patterns evolving?

You can find the slides for Bilgins talk at his slideshare account.

In the evenings Bilgin, myself and Krzysztof had the pleasure of accompanying some of our Apache friends from Talend and go out for tapas and a few beers. The highlight was the first evening on Wednesday where we found an excellent tapas bar with great food. I took a photo but unfortunately it was blurry.

Blurry photo but the food was excellent

I had to return back on friday morning as I have been attending two birthday parties with my friends in Sweden. So I could not attend the last day where Yahoo Japan gave a talk about Apache Camel and how they are using Camel in their production systems in Japan. I had the pleasure of meeting the speakers the day before and talk about Camel and what they are doing.

I also had many other hallway talks with attendees and fellow speakers about Open Source, Apache, and Apache Camel. It was great meeting so many and hearing about what is happening.

ApacheCon EU 2016 was great, and the location in Sevilla is awesome. I hope to be back in 2017 if Camel still sparks interrest and my talk is accepted.