2015-12-30

My thoughts on buying professional documentation

The Apache Camel project has a lot of documentation online at its website, we have more than 1000+ pages. However due to project was created so many years ago, and the choosing of a wiki based system for documentation, has lead us today with a website and documentation that is a challenge to navigate and keep up to date, and have a modern look and feel.

The Camel team is aware of this, but its a huge undertaking to build a new website and restructure and redo the documentation. But we will get there, part of the help is the work on being able to keep the EIPs and components, data formats etc. partly up to date based on a build system that can sync the source code and documentation, to ensure all the options are present and documented.

However this last last blog of mine for the year 2015, is a concern of mine. Are commercial companies so bad at allowing their engineers to buy books about the various open source projects they are researching or using?

I sadly see too many new users to Apache Camel, that could benefit from buying one of the many Apache Camel books, and read a few chapters to help set the scene, and get the reader on a much better path and journey with using Apache Camel. I also sometimes encounter private emails from big companies asking for help about various Camel issues they have, and from what I can see then 7 or 8 out of 10 questions are already covered in the books, or at least the books could guide them to a solution in much less time. Besides the books there is also Camel training, where some companies offer training either online or onsite.

Apache Camel is a very feature rich integration library, and it has a lot of functionality. And you will be much more successful when you learn this piece by piece. The Camel books will help you archive that by covering the pieces chapter by chapter.

As an author myself I know that there is a lot of effort going into making a book. The level of details and work from both the authors and publisher goes beyond what is possible to do as online website documentation. You should really see this as different kind of documentation, which gives the synergy effect where 2 + 2 = 5. 

So are we there where a $30-60 book (depending on discount codes and print vs ebook). And during x-mas there is even some publishers that has all their books on sale for $$ is a barrier to entry? Are companies that make $$$ in using free open source projects, and never contribute back, not even able to let their developers get hands on the best documentation, to allow them to be even more successful? 

Professional documentation such as books are a key to become more successful

You may also consider that as a developer in the IT industry, you have constantly to improve and learn new skills to keep up, or stay relevant. During my many years in this industry and with the rise of the internet, its become much easier to self study, than in the old days, where you had to wait 1-2 years before your company would send you to some outside training. So what cheaper way is there not to spend a bit $$$ on a book (and if your company reimburse its even better) and start reading. 

If you look for free material, then I was recently interviewed by DZone and there I gave some links to what I think are good resources to get started learning Apache Camel. There is links for both blogs / articles / videos etc.

Its been many years since I last did a job interview, but in my previous engagements a question of mine was always asking for the company to allow me to buy IT books of my choosing.

I buy books today as well. Because I like to read the old fashioned print books, I am looking forward to the Netty in Action book, to learn this excellent library much better, which also helps me to better support the Camel netty components. Another book I enjoy reading is the Functional Programming in Java book which is excellent at covering all the new stuff that Java 8 brings to the table.

To end my blog, then Manning has a 39% discount on the Camel in Action 2nd edition book (you will get 1st edition for free - the ebook version) if you order the book using the discount code camel39 from their website.

2015-12-24

A few recent Apache Camel presentations on youtube

Markus Eisle has been giving a number of Apache Camel talks this year, and recently his talks from Oredev 2015 and JavaOne 2015 was made available on youtube. Markus has a strong JEE background and so he touches how to use Camel on JEE servers such as JBoss Wildfly.


Myself has been giving talks at the Red Hat MicrosServices days we hosted this year at London and New York. My talk from the big apple was made available as well.



Developing Microservices with Apache Camel
(notice the first 10-15 minutes is a Camel introduction part).

Have a happy Christmas and see you in 2016.

2015-12-17

DZone Q&A with Claus Ibsen on Apache Camel

I was recently interviewed by DZone about Apache Camel.

If you have ever been faced with the task of integrating multiple enterprise services, Apache Camel is definitely a tool you should have in your toolbox. In this Q&A, Claus Ibsen shares some insights into the origins of Camel, how to get started, some of the challenges working on a such an ambitious project, and where Camel is going.

The article has just been posted online: https://dzone.com/articles/qa-with-claus-ibsen-on-apache-camel

I also talk a bit about what else I am working on currently besides Apache Camel, such as fabric8, hawtio and the Camel tooling.

2015-12-16

Video of Apache Camel tooling to edit your routes in type safe manner

Today its a special day. I am doing two blog post on the same day. I do not think this has happened before.

This blog post is a quick video which I though was about 5 minutes, but its more 10 minutes. Sorry so you may need to grab a big cup of coffee or tea.

The video demonstrates the current progress we have done on the Camel tooling from the fabric8 project. We have developed a set of small Camel commands that let you able to edit/work on Apache Camel projects in any IDE of choice such as IDEA, Eclipse or NetBeans. And as well from command line and web browser. The latter is being demonstrated later.

This video shows how to edit Camel routes with endpoints in a type safe manner that are Java code. To do that I use the vanilla Apache Camel 2.16.1 release with the camel-example-spring-boot.

fabric8 camel commands to edit Camel endpoints in a type safe manner

The video demonstrates how to install the camel tool and use it in IDEA, Eclipse and from the command line. Yay finally you are not forced to use Eclipse heavy weight tooling. Just imagine when we get code awareness added to the tooling so you just press ctrl + space in your Camel endpoints uris and the tooling shows a popup with code suggestion for every option, just as the tooling does today for Java code ;)

To active and use forge from IDEA press cmd + alt + 4. From Eclipse its just cmd + 4.

Beers++ to the JBoss Forge team to make this tooling library so awesome, allowing us to develop the code once, and reuse it in IDEA, Eclipse, NetBeans, CLI and web with REST.

The Camel tooling is documented (a bit limited) at the fabric8 documentation. But there you can find the latest release, as we do frequent releases at fabric8 so it can be a good idea, to take a look there to ensure you install the latest if you try this on your computer.


JBoss Fuse 6.2.1 Released - How to quickly try it

JBoss Fuse 6.2.1 was recently released which is a much hardened release of the summary 6.2.0 release. The Fuse team has spent a lot of time to QA and harden the bits, as we all know OSGi is tricky, and the runtime provisioning of Karaf containers either manually managed or managed with fabric8 v1.

When 6.2.0 was released I wrote a blog post with some easy steps how to try this release. I did this because I do not agree with the getting started guide at the JBoss Fuse website. IMHO those steps are too complicated, lead you in wrong directions, and let you spend your first experience with JBoss Fuse, to download and install an Eclipse Editor, which sadly is a myriad of confusing steps to install, and worst of all it alters your local maven settings. I have cried wolf about this many times within the company but to no avail. Likewise in the bottom of the getting started guide, the table with reference to more material refers to a mix of old examples, none working examples, and videos that are outdated. Instead you should look at the examples that are actually shipped which is in the quoickstarts directory of the installation.

As I am not primary working on JBoss Fuse anymore, its much less I can do, and surely as a developer when it comes to presenting the product on the Red Hat websites. So why I am doing this - I am tired of the history repeating itself, and that a product I have been passionated and worked hard on, first as part of the FuseSource company and for 3 years within Red Hat. 

So lets repeat the history. If you want to try JBoss Fuse 6.2.1 then I suggest you follow the steps I blogged about last time. They are the same, what is changed is the version number from 6.2.0 to 6.2.1, and the build number is 621084.

The link to the 6.2.1 download which you can also find on the JBoss Fuse website, which is that green button.


2015-12-14

Mule vs Spring Integration vs Apache Camel compared by Black Duck Open Hub

A few days ago there was a tweet that referred to Black Duck Open HUB where the following three Java integration software was summarized:

  • Mule Community Edition
  • Apache Camel
  • Spring Integration

I do like the quick side by side comparison with the various metrics Open HUB gather from the source code repositories of those three projects.


There are a bunch of other metics that are displayed, one of them displays a graph of the number of unique contributors that made code changes to the project month by month.



In the case of Apache Camel there is year over year growth and we on average about 25 unique contributors each month. That is a healthy sign of that the project is truly a community embraced project, and not in the hands of a a single vendor. As I have said many times in the Camel community - we love contributions.

One stat I would liked to see in open hub, would be if the code repository is available on github, then the number of stars could be listed as well. Todays number are:
  • Mule Community Edition: 260
  • Apache Camel: 681
  • Spring Integration: 402

2015-11-18

The fabric8 guys goes to London for full-day open microservices event

In the summer 2015 Red Hat hosted a microservices event in London, which I previously blogged about. This event was a success and all seats was booked. So we promised to do the event again. Recently we visited New York for a similar event that was packed as well.

So in the first weed of December the fabric8 guys is going to London for the Red Hat Microservices Day. Red Hat is hosting a all day event titled Microservices Developer Day on December 3rd 2015 at London South Bank University.

You can find the full agenda, location and how to register from the website.

So if you are interested to hear what is the latest from Apache Camel, hawtio, fabric8, apiman, Docker, Kubernetes, OpenShift3 et all then there is a lot of content presented on that day.

The fabric8 guys works in the upstream communities so you will hear no product or marketing pitch from us, its all the real fun stuff what happens in the true open source developer communities.

We enjoy hearing what you guys are doing and what its the good, bad and ugly with the technology. After these events we usually have a task list with some items to improve the projects or a issue that was of a matter to a number of people, so we re-gained focus on that matter to fix/improve it.

If you want to keep in touch with what happens with fabric8 and what the fabric8 guys is hacking on, then I suggest to follow us on medium - https://medium.com/fabric8-io and as well check out our fabric8 website.

Some of the projects that fabric8 already integrates and provides out of the box
For example James Rawlings recently posted a blog and video about the latest work on our CI/CD story with fabric8 on kubernetes. Its really awesome how different technologies and projects can run seamless and well integrated on the platform, installed by a single click.


2015-11-13

Using Camel commands to manage a Spring Boot Camel application

So its friday and I though I could do a quick video recoding of a new feature coming in Apache Camel 2.17.

Thanks to community contribution we have the Camel commands ported to work with Spring Boot. That means you can just add camel-spring-boot and hack your Camel routes and whatnot, and included you get the Camel commands.



To use the Camel commands you need to enable the Spring shell, which is just to add a dependency

 <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-remote-shell</artifactId>
  </dependency>

Then when you run spring-boot then it has shell enabled out of the box. You can then SSH into the JVM of the spring-boot and use its shell to manage it. And in there you now have the camel commands as well.

The video shows all this in action.

And you can try yourself with the camel-example-spring-boot which we ship in the Apache Camel release. All this will be in the Camel 2.17 release which is expected in Q1 2016 (may slip into start of Q2).

The link to the video is here.

2015-11-11

I am presenting Apache Camel in Copenhagen next week

Next week I am going home to Denmark, to present Apache Camel in general and then a 2nd part that is focused around developing micro services with Camel, and running those in Docker containers in a Kubernetes platform. And all of that becomes easier for developers with the help from the tools and services we provide in the fabric8 project.




The event takes place on tuesday 17th november in the afternoon. There is three sessions, where Jakob Bendsen and Christian Damsgaard will talk about APIs and RESTful services with Camel.

The agenda, location, and how to register is all provided by Javagruppen, whom is organizing the event.

You can find the details here.

After all the talks there is pizza and beverages. Hope you have the time to stay, as I loved to hear war stories from the fields, and potentially news about where Camel's are in use. I have also some great stories about where Camel are in use you may not know or realize how a prominent role it plays in so many companies and public sections around the globe

The location was initially in Glostrup, but the event was quickly sold out (its free to attend for Javagruppen members) in less than 12 hours. So Region Hovedstaden was quick to save the day and provide a bigger location.

PS: The event takes place at Region Hovedstaden, Center for It, Medico og Telefoni, where I in the past had worked as a consultant. It's great to be back for a day. Hope to see familiar faces at the event. Region Hovedstaden is a long time Apache Camel user.

2015-10-26

The fabric8 guys goes to New York for full-day open developer event

In my youth a one-hit-wonder band emerged with the hit Frankie Goes to Hollywood.  And based on their popularly a poor computer game was done in their name.

c64 game of Frankie goes to Hollywood - yes it was a poor game

Now fast  forward 30 years and its no longer Frankie that is going, but some of us from the fabric8 team and we are stopping at the east coast in the big apple city.

And in 30 years the software has become much more awesome, and we can also play video games in our web browsers, where we can shoot angry pods.

Playing angry pods allows you to shoot the running pods. Here I am shooting at a Camel pods that runs the Camel CDI quickstart application.





goes to

the big apple city


Red Hat is hosting a all day event titled Microservices Developer Day on November 4th 2015, on west 39rd street on Manhattan, New York.

You can find the full agenda, location and how to register from the website.

I will be there to give a talk about developing microservices with Apache Camel, ready for the containers platforms with Docker, Kubernetes, OpenShift. and of course fabric8.

We are honored to have Tim Hockin from the Google Kubernetes team, to keynote about containers and Kubernetes. So its a great chance to hear from the Borg's how they see them taking over the worl... ehhhhh how awesome Kubernets is ;)

Earlier this year, in June, we hosted a similar event in London, which I previously blogged about. So you can take a look at the blog entry to read more about what kind of event this is. Since the London event we had 4-5 months more to hack on fabric8, so we have more awesome stuff in the toolbox to show and talk about.

And we are talking and demonstrating using the upstream community projects so you will see the bleeding edge from Apache Camel, apiman, and fabric8.

The apiman's will be there (hopefully in red tie, as the apiman logo wears red tie), to let you see how this awesome project can put in API management to your platform in a non invasive fashion.

Kurt and Marc from the apinman project in London presenting

Link to event: https://meeting-reg.com/redhat/new-york_november4/

2015-10-21

hawtio v1 still going strong - New release with log plugin working on Karaf 3.x/4.x containers

The hawtio project is about to be 3 years old in next month, where the first commit was done by James on the end of november.

I blogged the first time about hawtio in april 2013, where the project has taken so much form that the Camel plugin was showing its promise, and we had the dashboard plugin that allowed to customize the ui with widgets you wanted.

About a year ago we started version 2 of hawtio that is taking the project more into a native web based frontend project, as opposed to v1 which has some ties to Java.

This blog is not about v2, but about v1 that is still going strong.

Today we released 1.4.56 (yes we love doing frequent releases) and in this release we managed to get the log plugin to work with Apache Karaf 3.x and 4.x containers (the Karaf team refactored a lot in 3.x that breaks stuff). To ensure this keeps working we ported over the log adapter from fabric8 v1 to hawtio v1 so we have the module natively in the hawtio project. This allows us to maintain the log adapter source code easier and ensure it continues to work with what changes the Karaf team may come up with.

In the screenshot below I installed hawtio in a vanilla Apache Karaf 4.0.2 release, and open the web console on localhost:8181/hawtio/ and login with karaf/karaf, and then the log plugin shows the log from Karaf. In the filter you can filter by keywords which gets highlighted in the log as well.

hawtio log plugin works in Karaf 3.x and 4.x containers

Unfortunately due the Karaf changes the log plugin does not work with Karaf 2.x containers.

This release also improves the Camel plugin which know shows endpoint / component documentation where we group the options in tabs. This helps with those endpoints that has a lot of options such as the file / JMS component.

hawtio now shows Camel endpoints properties grouped by tabs
You can find the latest release of hawtio at the website.






2015-10-16

Cheers - Video recording of walk-through of the simple Java fat-jar fabric8 quickstart

Today we released a new version of fabric8 - version 2.2.51. Well in fact that is no so big news, as we do frequent releases.

But I am using this an an excuse to grab a beer and record a video. The video walks you through how to get started deploying and running your Java applications on fabric8, or to be more precise an OpenShift or Kubernetes Platform.

fabric8 - Walk through of the simple Java fat-jar quickstart

The video was recorded as a one take you get to see the few mistakes I do, and as such the videos is about 15 minutes long. The video is primary using the command shell as the interaction with OpenShift and Kubernetes. This is on purpose to show there is no hidden agenda, and that you can use any kind of tool, or is not locked into using heavy and complex tools.
Note the video is demonstrating a simple deployment strategy where we deploy straight to the platform. The fabric8 project has a much more sophisticated story for DevOps and CI/CD.  James Strachan and James Rawlings are working hard on this, and are currently recording a new set of videos to show the latest progress in that area. So expect me to point your in their directions where we have more to show. In fact a good source to keep up what happens on fabric8 is to follow fabric8 on medium.

Okay back to my videos, which is essential a video recording of our new beginner guide for the most simple quickstart we have with fabric8. And you may never expect to hear from my mouth, but this video is without Camel. There is sadly no Camel in this video. And the reason is that Camel has been a bad animal. I spent hours today chasing a problem with generating a new updated website for fabric8, which after hunt using git insect finally had to come to the reason, that for some reason a Camel upgrade causes a Scala scalate compiler to barf and spit out a 250+ lines long strack-trace that leads you astray. Yeah I guess I got a bit karma in my face for all the Camel users that may have looked at long Camel strack-traces in the earlier releases of 2.x, until we refactored the core and collapsed the strack frames tremendously. Ah okay well before this problem I would have started with the most simple quickstart anyway, which does not include Camel.

Stay tuned for more videos and documentation to come together in the near future where we will continue this trend, and look at how to build microservice applications using Camel on the world of docker and kubernetes.

Good weekend and cheers.

2015-10-12

Apache Camel 2.16 Released - Top 10 highlights

Apache Camel 2.16 was released last friday.




This blog entry is my attempt to do a top-10 (+ 1 as bonus) highlights of this new release.


1. Dynamic To

Very likely the top FAQ question from Camel users, is how do I send a message to an endpoint which uri should use a dynamic value from my message such as a header.

Up until this release the answer would be the recipient list EIP.

But to make this easier we introduced a dynamic to in the DSL that uses the simple language for dynamic computed endpoint uri, and sends the message to that single endpoint. For more advanced use-cases the answer is still recipient list, as it can send to multiple endpoints, in parallel, and do aggregation and much more.

So the example from the FAQ

.to("freemarker://templateHome/${body.templateName}.ftl")

Where the solution with recipient list would be:

.recipientList(simple("freemarker://templateHome/${body.templateName}.ftl"))

Can now easily be done using toD

.toD("freemarker://templateHome/${body.templateName}.ftl")

In XML DSL you would use

We made to and toD separated on purpose. As the former allows Camel to optimize as it knows its a static endpoint, and the latter is dynamic.

The dynamic to is also supported in a few other EIPs such as WireTap, and in the rest-dsl.


2. Enrich and PollEnrich now supports dynamic endpoints.

Because of the new dynamic to, with toD, it made headway for being able to introduce this into the Content Enricher EIPs for enrich and pollEnrich. This has been on popular demand for a number of years, but was initially planned as a Camel 3.0 change. This works as toD does by supporting the simple language in the URI.

A little example:

from("direct:start")
  .enrich().simple("http:myserver/${header.orderId}/order")
  .to("direct:result");

Notice how we can refer to the header using ${header.orderId}.


3. All inclusive Component documentation

We have 199 components (some are variations such as ftp sftp etc) in this release. And for every single option you can configure on the component or the endpoint is now documented with javadoc.

That documentation is then extracted during the build process which makes it available at runtime, which you can access using Java API, JMX, or the Camel commands.

We have also started the process to label (think as a tag/badge) each option so you can see whether the option is for consumer, producer, security, advanced, and so on. This is an ongoing process, but we have done this for the components that has the most options.

This is a a continuation of the effort we started all way back in Camel 2.12. The previous Camel 2.15 release had a lot of documentation, which I have blogged about. With Camel 2.16 we now have 100% coverage of the documentation, and we have enabled a validation check during the build that will fail of options lack documentation.

With this functionality tooling such as hawtio can make beautify UI to present information about your Camel application such as shown below:

hawtio shown at runtime endpoint properties how its configured. The options is grouped in tabs.

4. More deep level JMX statistics

We have overhauled all the EIPs to offer more runtime statistics about the EIPs. For example the Content Based Router now allows to list all the predicates, and break-down which of these predicates have been used the most. The load balancer EIPs also exposes statistics such as their current state, which exception has been triggered the most, and so on. That goes around for all the various EIPs. In addition the configuration of the EIP is also exposed.

We also managed to make it possible to have your custom Camel components or Java Beans mixin their custom JMX attributes and operations together with the standard set of attributes/operations from Camel. Before that was not possible and it would be only yours that was available. I have blogged about this previously.


5. Incoming and Outgoing Endpoints

We now keep track of all the incoming and outgoing endpoints in the endpoint registry. The registry is accessible from Java, JMX, and the Camel commands. The registry also keep track of how often each endpoint is in use, so you can know which ones are the most in use.

I have previously blogged about this, and recorded a video to demonstrate this in action.


6. Swagger 2.0 in pure Java

The swagger component has been ported to Java as a new camel-swagger-java module, and upgraded to the swagger 2.0 spec. We also integrated the camel-swagger-java to the rest-dsl, and being able to use the selected HTTP component of choice. So if you use jetty with rest-dsl then the swagger module can reuse that for exposes the api docs over HTTP. The old module that is Scala based is deprecated and was only able to expose the api docs using a servlet.

I have previously blogged about this and recorded a video of this in action.


7. rest-dsl improvements

You can now configure documentation for the parameter mapping of the rest service, for query parameters, path, body, and so on.

You can find more details from a little example that is shipped in Apache Camel.


8. Script DSL

We introduced a dedicated script in the DSL, to allow executing a script during routing, which by default does not modify your message. We found a number of users wanting to do this, but had a bit pain to use the language component and remember to set transform=false. With the script DSL it stands out in the route.

A little example to run some groovy script

<route>
  <from uri="file://inbox"/>
  <script>
    <groovy>// some groovy code goes here</groovy>
  </script>
  <beanRef ref="myServiceBean" method="processLine"/>
</route>


9. Camel proxy easier to use with parameter binding enabled

If you use Camel proxy to hide middleware behind an interface, then when invoking the method(s) on the interface, now performs parameter binding up-front. We found out this is more intuitive and allows to map to these parameters from the message body/headers etc, just as you would do with the bean component.

See more detail at Camel proxy.


10. A few other great new stuff

The file consumer now supports a read lock mode using idempotent. This allows safely to have clustered file consumers compete a shared file system for the same files, to ensure exclusive read lock controlled by a idempotent repository of choice, for example using hazelcast.

We also provides Maven archetypes for creating microservice style using spring-boot and cdi.

The aggregator supports a pre completion mode that allows the incoming message to complete previous group and start a new group with itself as the first message.


11. More components

There is 12 new components, and 3 new data formats.

  • camel-paho - For MQTT messaging using Eclipse Paho client
  • camel-pdf - For creating PDF documents
  • camel-grape - allows you to fetch, load and manage additional jars when CamelContext is running.
  • camel-slack - allows you to connect to an instance of Slack and delivers a message contained in the message body via a pre established Slack incoming webhook.
  • camel-jolt - for JSON to JSON transformation
  • camel-aws-ec2 - Component providing support to Amazon Web Services EC2 
  • camel-undertow - To use Undertow as HTTP server or client.
  • camel-git - A generic Git component
  • camel-sjms - SJMS Batch is a specialized component for highly performant, transactional batch consumption from a JMS queue
  • camel-http-common - A common base component for reuse among all the various HTTP components we have.
  • camel-swagger-java - A pure Java based Swagger component.
  • camel-elsql - An extended SQL Component that uses ElSql for defining SQL queries
  • camel-jbpm - Sends messages through kie-remote-client API to jBPM. 


For example there is a generic git component, a pdf component to output PDF documents, and a new batching JMS component that allows to batch X number of JMS messages and aggregate them into a single message all within a transactional boundary.


For a detailed list of changes in this release, see the Camel 2.16 release notes. As always make sure to read the important changes to consider when upgrading section, when you are upgrading from an older Camel release.


2015-10-09

Cheers - Two new releases today - hawtio and Apache Camel 2.16

Today we had dual releases of both hawtio and Apache Camel.

I recorded a little video where I show hawtio in action to demonstrate some of the new functionality that hawtio can do with Camel.

Video shows hawtio with Camel and the latest bells and whistles
I hope to get time next week to do a blog post on the impressive Apache Camel 2.16 release to highlight the great new stuff it comes with. But as some of you may know I have a lot of writing on my mind with also the Camel in Action 2nd edition in the works.

Cheers and have a great weekend.

2015-09-23

Apache Camel 2.16 - Swagger Java and API documentation out of the box

In the upcoming Apache Camel 2.16 release we recently added a pure Java based Swagger module, camel-swagger-java.

This module is replacing the older camel-swagger module that was Scala based. The new module is also using the new swagger 2.0 spec. And least but not least the module integrates out of the box, so end users just need to turn it on, by declaring the context-path to use for servicing the Swagger API documentation. Then Camel is able to auto detect camel-swagger-java on the classpath and tie into the swagger model read and generate the API as swagger 2.0 in json format. All this can be run in any kind of JVM. You do not need to use a servlet container (but you can).

5 minute video demonstrating the new camel-swagger-java module in Action


To demonstrate this I recorded a 5 minute video showing this in action. The example is shipped out of the box in Apache Camel as the camel-example-swagger-cdi.


2015-08-11

Apache Camel 2.16 - Components with custom JMX is now addon on top of standard set of JMX

In the upcoming Apache Camel 2.16 I took a second attempt (I am currently writing about JMX for the Camel in Action 2nd edition book) of making it much easier to define custom JMX attributes and operations on your components, and have that added together with the standard set of JMX that Camel provides by default.

Beforehand it was not possible to add custom JMX operations and having the standard set included out of the box. To make this possible, you would need to re-expose the standard set of JMX in your custom component.

But I am happy to have found a solution that is being committed shortly to Apache Camel 2.16. 

So given this simple custom component (from the Camel in Action book), which exposes a single JMX attribute named verbose, on the custom component called ERP.

Custom component exposes a JMX attribute named Verbose
Then using this component at runtime would in Apache Camel 2.15.2 only show the Verbose attribute:


But the same code running on Apache Camel 2.16.0 now has all the default JMX attributes and operations as well:


This works also for any custom bean you may use in your routes. So for example if you call a POJO using using bean in the route DSL, then the custom POJO will be listed in JMX under processors. All you have to do in your POJO is to annotate it with the Camel @ManagedResources and then @ManagedAttribute for attributes and @ManagedOperation for operation.

All the existing Camel components we have (150+) could also benefit from this. So they could expose more custom information in JMX for their endpoints, consumer, producers etc. We have hold back a bit in the past to do this, due to this problem. But with a solution we can now move on. This task has been logged as CAMEL-9074.


2015-07-28

Apache Camel 2.16 - Show me all my incoming and outgoing endpoints in real time

In the upcoming Apache Camel 2.16 release we expose even more information about your running Camel applications.

We recently added specialized mbeans for all the different EIPs to expose EIP specific information. Before we had a few mbeans for some selected EIPs. But in Camel 2.16 we have for all of them. For example the content based router now keep track of which of its predicates that matches how many messages at runtime. A screenshot below.

The Content Based Router can now show information about each predicate and how many times it has matched during routing


The throttler EIP will expose how many messages are currently held back, and how long time before they are released. The circuit break exposes the state of the breaker whether its open, half open or closed. And the failover load balancer keeps taps of how many times each different exception has triggered a failover, and so on.

Also each EIP is provides details about how its configured, and you can also dump that information as XML (as you may know you can do for the entire route), but this is for the EIP alone.

Another new feature is that we also keep track of the utilization of all the endpoints. There is a global mbean that provides a list of all top 1000 recently used endpoints (the size is configurable), and how many times those endpoints have been used. What is cool is that we also track whether the endpoint is an incoming or outgoing endpoint.

To demonstrate this in action, I recoded a little shot video showing this, together with the new endpoint-stats command we have in the Camel commands.

Apache Camel 2.16 video to show all incoming and outgoing endpoints in real time, as Camel applications get deployed to a running Karaf container

We also introduced an Extended JMX statistics level, which you can turn on. When running in this mode, each EIP will also track their personal usage of each endpoints. So what the video does is on a global level. But with the extended mode, you can drill down on each EIP and see how many different endpoints they use, and which ones are the most often used. For example if using the Recipient List or Dynamic Router EIP to route to many different endpoints.

We all this new information it allows Camel tooling to go even further. We are working on adding more coolness to hawtio, so it can show a wobble diagram of all the inter relationship with your Camel routes within a Camel context, but also at a higher level, the communication between different Camel applications.

And of course as well in table like view, as the endpoint-stats command does in the video.