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.


2015-07-14

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


2015-07-02

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

      bin/fuse

     and for windows

    bin/fuse.bat

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] ------------------------------------------------------------------------
[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] BUILD SUCCESS
[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
JBossFuse:karaf@root>

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

      log:display

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)

         log: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.