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.


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.


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.


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.


Camel in Action II - We will be back with an even more awesome book

So its time again - we are back and announcing Camel in Action 2nd edition.

Camel in Action 2nd edition - Nah the Camel is still lazy and sitting down ;)

The first book has done well and its time we get back into the saddle and ride hard to deliver another excellent book.

Jonathan and I are thrilled to be back after 5 years and writing about Apache Camel again. Readers of the 1st edition will get the same level of dedication and hard work we put into the first book. We have taken all the best chapters from the first edition and updated them with all the latest functionality that Apache Camel offers together with all the excellent feedback we have received over the years about the book. We have also not been afraid of dropping content from those chapters which are less attractive today to add in more content.

We are adding 6 new chapters, and are expecting the book to be 1/3 longer - yeah more work for us, but we want to capture all the details of what is possible with Camel today. As for new content you will find chapters that extensively cover how to do microservice style development with Camel. How you can quickly build and run Camel standalone in fat JAR style, or with popular containers such as Spring Boot, DropWizard or with Jetty or CDI containers.

You will also find chapters that takes Camel even further how to scale and cluster Camel so you run many of them. And of course a lot has changed since the 1st book, such as the cloud, docker, and kubernetes, fabric8 and hawtio. And for the reactive movement we will talk about RX Java and vertx. So we will go even further this time and take you through all this exciting new shiny toys you can do with Camel.

Users of JBoss Fuse, or ServiceMix / Karaf will not be forgotten. We are biting the bullet and cover using Camel on OSGi much more in depth than in the 1st edition - back then OSGi was not really that well mature as it is today.

Oh btw we would love to do a chapter on iot, so let us know if you feel the same way. Then we will reach out to our friends from Camel Labs and have them help out as guest author to write about all that. They have done some great blogs to showcase what Camel already can do on embedded devices and micro controllers.

Manning have told us that if you purchase the 2nd edition, you will get the 1st edition for free (an electronic copy, not the hardcover).

And to celebrate this announcement the Camel in Action 2nd edition is MEAP of today, and you can get 50% off if you order today from Manning website using the coupon code: dotd071415au


JBoss Fuse 6.2 released - guide how to quickly try it

At the Red Hat summit last week, it was announced that JBoss Fuse 6.2 was released.

I want to congratulate the fuse team for getting this release out. I know that they have been working very hard all this year to QA and ensure its passes the high barrier of quality expected from an enterprise product.

So with my Camel hat, its great to see a product that includes the very last Apache Camel 2.15.2 release and subscribers have enterprise support and maintenance of Camel for a very long time.

Jonathan Anstey, the great co-author of Camel in Action, wrote a blog post about the highlights of this release. You can find more details from his blog. The biggest highlight (I am biased) is of course the upgrade from Camel 2.12 to 2.15  ;)

The JBoss Fuse website has been updated with details about this new release, where you can also find the download and how to get started.

Now unfortunately as a personal taste of mine, they made the getting started guide longer and ... well to much JBoss tasty. Users do not need to start with a "complicated" install procedure of installing JBoss Eclipse tooling and then starting the Fuse server from an editor. 

Instead I suggest jump straight to install JBoss Fuse, which is a simple download and unzip, and run the script.

Okay so here is my alternative and simpler install procedure

1. Download JBoss Fuse 6.2.0.GA
2. Unzip the download, which you can do from the shell from linux/osx and using the file explorer for windows users etc.

    unzip jboss-fuse-full-6.2.0.redhat-133.zip

3. From the shell change directory to where you unzipped the download

    cd jboss-fuse-6.2.0.redhat-133/

4. Start JBoss Fuse


     and for windows


5. Wait for Fuse to start and show the welcome screen

JBoss Fuse 6.2 - Welcome screen
6. Create the administrator user (only need once)

The first time the welcome screen is presented, it shows a message about an admin user has not been created.

No user found in etc/users.properties. Please use the 'esb:create-admin-user'
command to create one.

So to create such an user, you execute that command to type in the username and password of choice. For development and personal use, it may be a good idea to just use admin/admin as that is easy to remember.

JBossFuse:karaf@root> esb:create-admin-user
Please specify a user...
New user name: admin
Password for admin:
Verify password for admin:

7. Open the web console and login

Now that we have an administrator user which has permission for the web console, we can try that. So open a web browser with http://localhost:8181 and login with the user you just created.

The web console is based on the excellent hawtio, which offers a rich set of capabilities. On the screenshot we can access the server logs, or even the shell terminal, and whatnot.

Fuse web console showing the server logs

8. Lets build and install a Camel quickstart

Okay we love Camel so lets build an example and deploy it to JBoss Fuse. To do so open a shell and in the quickstarts directory a number of examples is shipped.

We will use camel-log as its a simple example that logs a message every 5th second. To build the example

     cd quickstarts/beginner/camel-log

And then run

    mvn clean install

Notice each quickstart has a readme file with full instructions how to build and install (install are 2 options as standalone or with using fuse fabric). Here we use standalone mode.

You will see something along the lines of this when running

davsclaus:/opt/jboss-fuse-6.2.0.redhat-133/quickstarts/beginner/camel-log/$ mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss Fuse Quickstart: camel-log 6.2.0.redhat-133
[INFO] ------------------------------------------------------------------------
[INFO] --- maven-bundle-plugin:2.3.7:install (default-install) @ beginner-camel-log ---
[INFO] Local OBR update disabled (enable with -DobrRepository)
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------

If the build is a success, then we are ready to install it. We can do this from either the web console, or from the JBoss Fuse shell.

From the fuse shell type this a bit long command to install and start the example we just build

JBossFuse:karaf@root> osgi:install -s mvn:org.jboss.quickstarts.fuse/beginner-camel-log/6.2.0.redhat-133
Bundle ID: 265

And in the web console a Camel button will appear in the top, which allows you to see all the running Camel applications inside Fuse. 

Fuse web console showing all the Camel applications running inside with real time metrics

And if you click on the Logs button then you will see the camel application is logging a message every 5th second.

You can also see the logs from the fuse shell, if you type


2015-07-02 10:07:15,441 | INFO  | #0 - timer://foo | log-route                        | ?                                   ? | 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | >>> Hello from Fabric based Camel route! : root
2015-07-02 10:07:20,441 | INFO  | #0 - timer://foo | log-route                        | ?                                   ? | 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | >>> Hello from Fabric based Camel route! : root

You can also tail the log from the shell (use ctrl + c to stop tail)


9. Where to go more

Okay that was just an alternative getting started guide to quickly try out the new JBoss Fuse 6.2 release. 

With this release there is also the JBoss Eclipse Tooling you can try. It has the impressive visual Camel debugger, and also the graphical Camel route editor. The Fuse Eclipse team has improve the tooling a lot, and continues to do so. I have previously blogged a little bit about that. To install this tooling then follow the step 1 on the official JBoss Fuse getting started guide.


JBCNConf - A great new conference in Barcelona

I just returned from Barcelona, after having a great time at the JBCNConf 2015 conference. Its the first big Java conference in Barcelona, and there was more than 220 people attending coming from 40 different countries.

JBCNConf 2015 - A great new conference has born in Barcelona

I was there with my fellow colleagues from the xPaaS team. We arrived on thursday and the speakers dinner was down at the beach so we had a nice walk towards the place, where we then enjoyed some beers and tapas.

We are walking at the beach towards the speakers dinner at the beach

Speakers dinner at the beach

The conference started on friday morning and James Strachan kicked off the event with the keynote where he presented Kubernetes for Java developers. As usually James does a brilliant job at presenting.

James Strachan giving the keynote about Kubernetes for Java developers

I then watched a few talks such as Bartek presenting vertx, and Jean Babptiste talked about Apache Karaf. vertx 3 is really looking impressive, and I would like to see how Apache Camel can become a plugin in the vertx family. We do have a camel-vertx component today but I feel its more for Camel needed to call into an external vertx event bus. The idea for the Camel vertx plugin would be to flip this around, so vertx developers can easily use Camel and it would feel all natural in the vertx family.

Apache Karaf 4 is on the way, and its great to see some of the ideas from fabric8 1.x has found its way into the core of Karaf. And hopefully they make Karaf easier and better as a immutable container that fits modern times with docker/linux containers.

Then it was lunch time which is tapas in the square outside which is really nice.

Lunch time outside in the square with nice tapas

The xPaaS team chilling out in Barcelona, where Rob is making final touches on his slides before his talk
After lunch it was Rob Davies to present ActiveMQ in the cloud and how the fabric8 MQ module makes deploying and scaling messaging in the cloud much easier. Rob demonstrated an autoscaler functionality where MQ detects that if the number of brokers are under more pressure to handle the load, then it can automatic scale up and down new brokers, and re-shard the queues across the brokers.

Rob Davies talking about scaling ActiveMQ with fabric8

After Rob it was myself to present. And of course it is about Apache Camel, and it was a similar talk as I did 2 weeks ago in London. However this time I had time to polish and improve a few areas. For example we have managed to get the centralized logging to work, so I could show the logs from the pods in real time in the nice kibana console. There room was almost full and about 10% of the audience have heard about or used Camel. So its great to be able to present Camel to new users.

Claus presenting Camel. Yes Camel is awesome as micoservice in docker containers ;)

At the end there were a few questions from the audience, and one from James himself. He hasn't seen the Camel forge addons working in IDEA. So he was curious to see more what it could do. So we spend 5 minutes extra demonstrating how the tool easily can edit or add endpoints, where you get a UI wizard that has a form to fill out the options.

The slides for my talk has been posted on slideshare.

James Rawling was also with us, but this time he 'got lucky' and didn't have to do a talk. A bit of shame as his knowledge and experience with CI/CD is really interesting. Every customer and organization we talk to want such a solution. And with fabric8 and kubernetes we have built that using the most popular open source software, such as jenkins, gogs, nexus, sonarcube, taiga, gerrit and so on.

Then it was late in the afternoon and we went for a 'business meeting' in a cafeteria nearby. It is surely lovely here in Spain that all those cafeterias often have beer on draft. After the 'meeting' we want back to the conference to join the networking and party event on the square in the campus. It was great fun to speak to more people and hear about what they do. And that they are eager to learn more about the new cool stuff such as kubernetes, docker and fabric8.

Later in the evening we went out for dinner and then grabbed a jin and tonic at the local tavern that we had discovered yesterday which was located nearby our hotel. Yes we never leave a good opportunity wasted - some of the cool stuff that we have implemented over the many years has initially started as an idea on our many road trips.

The next day I went back to the conference for the 2nd day. I attended a few talks in the morning.

Manning has sponsored 5 Camel in Action books. So before I had to leave I signed those books, that later will be used in a raffle as a give away to the lucky winners.

Book signing with my impressions of the conference

Because the Camp Nou football stadium was only 1.5km from the event, I walked down there, and did the stadium tour. As I had to leave to the airport in about 1 hour, I had to rush a bit the tour. There were a lot of people and kids where they all the time had to stop and take photos and selfies.

Claus at the Camp Nou football stadium, home of FC Barcelona

Here at the end I want to congratulate the BarcelonaJUG for an amazing well organized conference. I really enjoyed it. It was laid back and great atmosphere. Hope to be there again in 2016.

On twitter I noticed they posted a photo of the top-5 talks. Its great to hear that our talks was well received. Also I was placed one spot higher than my boss ;)