- September 8th - Claus will give an introduction to Apache Camel including: core concepts, EIPs, components, and the community.
- September 16th - I will go over deployment options for Camel including: embedded Java, Spring, ActiveMQ, ServiceMix (OSGi) and web app. This will include a live demonstration of deploying a Camel application in ServiceMix.
Friday, August 27, 2010
Apache Camel Webinars at FuseSource
As Claus just posted, we are doing two webinars next month on Apache Camel at FuseSource.
Monday, July 12, 2010
Quick load testing with the Camel Dataset component
A pretty common thing I have to do is investigate issues that only occur when load is put on a system. Instead of hand coding message producers to pummel a Camel route or message broker, I've been using the Camel dataset component. I'm not sure many are aware of it but its an incredibly useful and easy to use tool.
For demonstration's sake let say we want to send 10000 messages in a tight loop to a ActiveMQ broker started on the local machine. First we download ActiveMQ
http://activemq.apache.org/activemq-532-release.html
and then start up ActiveMQ
bin/activemq
Now we set up a simple Camel app that uses the Dataset component in a Spring XML file (source available here):
So we first create a SimpleDataSet #1 with a size of 10000. This means that 10000 messages will be sent when we use this is the route. We also need to configure the connection to the ActiveMQ broker #2 that we will be pummeling. Finally, we have a Camel route that sends 10000 messages to a queue named myQueue #3. We also have another route that consumes from the same queue and dumps the message contents to the /tmp directory. You can run this now by issuing mvn camel:run on the command line. You will see output something like:
So this allowed us to quickly (1) set up a producer which sent 10000 messages, (2) consume those messages from the same queue and (3) report what the throughput was during the test.
The source for this example is available at http://people.apache.org/~janstey/blog_stuff/camel_dataset/dataset-test.zip
For more information on the dataset component, see the official Apache Camel documentation at http://camel.apache.org/dataset.html
For demonstration's sake let say we want to send 10000 messages in a tight loop to a ActiveMQ broker started on the local machine. First we download ActiveMQ
http://activemq.apache.org/activemq-532-release.html
and then start up ActiveMQ
bin/activemq
Now we set up a simple Camel app that uses the Dataset component in a Spring XML file (source available here):
#1
<bean id="myDataSet" class="org.apache.camel.component.dataset.SimpleDataSet">
<property name="size" value="10000"/>
</bean>
#2
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
<camelContext xmlns="http://camel.apache.org/schema/spring">
#3
<route>
<from uri="dataset:myDataSet?produceDelay=-1"/>
<to uri="activemq:myQueue"/>
</route>
#4
<route>
<from uri="activemq:myQueue"/>
<to uri="file:/tmp"/>
</route>
</camelContext>
So we first create a SimpleDataSet #1 with a size of 10000. This means that 10000 messages will be sent when we use this is the route. We also need to configure the connection to the ActiveMQ broker #2 that we will be pummeling. Finally, we have a Camel route that sends 10000 messages to a queue named myQueue #3. We also have another route that consumes from the same queue and dumps the message contents to the /tmp directory. You can run this now by issuing mvn camel:run on the command line. You will see output something like:
[pache.camel.spring.Main.main()] DefaultCamelContext INFO Apache Camel 2.3.0 (CamelContext: camelContext) started in 1155 millis
[et://myDataSet?produceDelay=-1] et://myDataSet?produceDelay=-1 INFO Sent: 2000 messages so far. Last group took: 2120 millis which is: 943.396 messages per second. average: 943.396
[et://myDataSet?produceDelay=-1] et://myDataSet?produceDelay=-1 INFO Sent: 4000 messages so far. Last group took: 1867 millis which is: 1,071.237 messages per second. average: 1,003.261
[et://myDataSet?produceDelay=-1] et://myDataSet?produceDelay=-1 INFO Sent: 6000 messages so far. Last group took: 2014 millis which is: 993.049 messages per second. average: 999.833
[et://myDataSet?produceDelay=-1] et://myDataSet?produceDelay=-1 INFO Sent: 8000 messages so far. Last group took: 2399 millis which is: 833.681 messages per second. average: 952.381
[et://myDataSet?produceDelay=-1] et://myDataSet?produceDelay=-1 INFO Sent: 10000 messages so far. Last group took: 1741 millis which is: 1,148.765 messages per second. average: 986.096
So this allowed us to quickly (1) set up a producer which sent 10000 messages, (2) consume those messages from the same queue and (3) report what the throughput was during the test.
The source for this example is available at http://people.apache.org/~janstey/blog_stuff/camel_dataset/dataset-test.zip
For more information on the dataset component, see the official Apache Camel documentation at http://camel.apache.org/dataset.html
Thursday, April 1, 2010
Understanding Camel components
We've updated Camel in Action today with 3 new chapters. That brings the total to 11 out of 13 chapters, which means we are getting close :)
One of the chapters is all about Camel components. The list of components in Camel has really exploded over the last few years. Camel ships with 76 components right now and there are dozens more available separately from other community sites. I mean, when presented with most integration scenarios we can easily say
"There's a Camel component for that."
So out of these components, which ones did we choose to cover? To make the content fit into one chapter we covered 11 components in 7 sections:
Why these components? Well, we felt that these were the most widely used and thus essential knowledge for any Camel user. Of course, other components are covered elsewhere in the book but not in as much detail as these.
Feel free to check out chapter 7 Understanding components in the latest book update or browse the chapters examples.
One of the chapters is all about Camel components. The list of components in Camel has really exploded over the last few years. Camel ships with 76 components right now and there are dozens more available separately from other community sites. I mean, when presented with most integration scenarios we can easily say
"There's a Camel component for that."
So out of these components, which ones did we choose to cover? To make the content fit into one chapter we covered 11 components in 7 sections:
Section | Components covered |
---|---|
Working with files | file, ftp |
Asynchronous Messaging using the JMS component | jms |
Web Services and the CXF Component | cxf |
Networking with the MINA component | mina |
Working with databases | jdbc, jpa |
In-memory asynchronous messaging | seda, vm |
Automating tasks | timer, quartz |
Why these components? Well, we felt that these were the most widely used and thus essential knowledge for any Camel user. Of course, other components are covered elsewhere in the book but not in as much detail as these.
Feel free to check out chapter 7 Understanding components in the latest book update or browse the chapters examples.
Tuesday, November 24, 2009
New Camel in Action Chapters
Today we posted 2 new chapters for the Camel in Action MEAP. Claus will most likely fill you in about the chapter on bean integration soon. Let me give you a little info about chapter 2 now though. Chapter 2 is basically all about routing - a pretty fundamental topic for Camel! I cover route creation in Java and Spring, as well as several EIPs. Since it is such an early chapter its pretty hand-holding throughout - you don't need to know Spring or EIPs beforehand, for instance.
I also introduce a new running example to the book: Rider Auto Parts. You may remember them from the DZone article Integration Nirvana I wrote earlier this year.
We actually started using a Google Code project for hosting the books source code so you can see the code for chapter 2 here:
http://code.google.com/p/camelinaction/source/checkout
In the coming months the source from other chapters will also be added. As always, we love feedback in the book's forum.
I also introduce a new running example to the book: Rider Auto Parts. You may remember them from the DZone article Integration Nirvana I wrote earlier this year.
We actually started using a Google Code project for hosting the books source code so you can see the code for chapter 2 here:
http://code.google.com/p/camelinaction/source/checkout
In the coming months the source from other chapters will also be added. As always, we love feedback in the book's forum.
Thursday, October 22, 2009
Camel in Action
As Claus just announced, we are writing a book with Hadrian on Apache Camel entitled "Camel in Action".

There has been a real need for such a book for a long time. We're hoping to fill the gap in the current documentation thats out there and provide a go to resource for new and experienced users alike.
A neat thing about writing at Manning is that readers can see the book as its being written (in all its rough glory :)) and provide feedback directly to us. Also its early enough in the writing process so that you could have real influence on what topics get included!
Feel free to check out the book and forums.

There has been a real need for such a book for a long time. We're hoping to fill the gap in the current documentation thats out there and provide a go to resource for new and experienced users alike.
A neat thing about writing at Manning is that readers can see the book as its being written (in all its rough glory :)) and provide feedback directly to us. Also its early enough in the writing process so that you could have real influence on what topics get included!
Feel free to check out the book and forums.
Monday, May 11, 2009
Introduction to the Open eHealth Integration Platform
Martin Krasser has just posted an excellent article on the Open eHealth Integration Platform (IPF). The IPF is essentially an extension of Apache Camel for the healthcare domain. Where Camel focuses on providing an easy to use domain specific language (DSL) for enterprise integration, the IPF adds DSL terms from the healthcare domain. Go check it out!
Introduction to the Open eHealth Integration Platform
Introduction to the Open eHealth Integration Platform
Monday, March 30, 2009
Apache Camel Refcard at DZone

Fellow Camel guru Claus Ibsen has created a lovely Refcard for DZone. From the description
This Refcard provides you with eleven of the most essential patterns that anyone working with integration must know. This Refcard is targeted for software developers and enterprise architects, but anyone in the integration space can benefit as well.
Go check it out!
Enterprise Integration Patterns with Apache Camel
Subscribe to:
Posts (Atom)