About this Book

Apache Camel exists because integration is hard and Camel’s creators wanted to make things easier for users. Camel’s online documentation serves as a reference for its many features and components. In contrast, this book aims to guide readers through these features, starting with the simple points and building up to advanced Camel usage by the end of the book. Throughout the book, Camel’s features are put into action in real-life scenarios.

Roadmap

The book is divided into three parts:

Part 1 starts off simple by introducing you to Camel’s core functionality and concepts, and it presents some basic examples.

  • Chapter 1 introduces you to Camel and explains what Camel is and where it fits into the bigger enterprise software picture. You’ll also learn the concepts and terminology of Camel.
  • Chapter 2 covers Camel’s main feature, which is message routing. The Java DSL and Spring DSL are covered as are several enterprise integration patterns (EIPs). EIPs are basically canned solutions to integration problems.

Building on part 1’s foundation, part 2 covers the core features of Camel. You’ll need many of these features when using Camel.

  • Chapter 3 explains how Camel can help you transform your data to different formats while it’s being routed.
  • In chapter 4 we take a look at how you can use Java beans in Camel.
  • Chapter 5 covers all of Camel’s error-handling features.
  • In chapter 6 we look at the testing facilities shipped with Camel. You can use these features for testing your own Camel applications or applications based on other stacks.
  • Chapter 7 covers the most heavily used components among Camel’s large selection of components.
  • Chapter 8 looks in depth at five of the most complex EIPs.

In part 3 we cover the topics that are useful when you’ve gained a better understanding of Camel from the earlier chapters.

  • Chapter 9 explains how you can use transactions in your Camel applications.
  • In chapter 10 we discuss how to deal with concurrency and scalability in your Camel applications.
  • Chapter 11 explains how to create new Camel projects, which could be Camel applications, custom components, or interceptors. This chapter doesn’t require much additional Camel knowledge, so you could read this right after part 1. The Scala DSL is also touched on here.
  • In chapter 12 we cover how to manage and monitor Camel applications. Among other things, how to read the Camel logs and how to control Camel with JMX are covered.
  • In chapter 13 we discuss the many ways to start and stop Camel. Deployment to several of the most popular containers is also discussed.
  • Chapter 14 covers what we consider extra features of Camel: routing with beans and using remoting to hide Camel APIs. We consider this extra because these features do routing without using any of Camel’s DSLs and in some cases with no Camel APIs. They take a different approach than what was discussed throughout the book.

The appendixes at the end of the book contain useful reference material on the Simple expression language, expressions and predicates, the producer and consumer templates, and the Camel community. Appendix E is written by Martin Krasser and shows how to use Akka with Camel.

Who should read this book

We wrote this book primarily for developers who have found the online Camel documentation lacking and needed a guidebook that explained things in a more detailed and organized way. Although we mainly targeted existing Camel users, Camel in Action is a great way to start learning about Camel. Experienced engineers and architects are also encouraged to read this book, as it explains advanced Camel concepts that you just can’t find elsewhere. Test and Q&A engineers will find Camel and this book useful as a means of driving tests that require communication with various transports and APIs. System administrators, too, may find the management, monitoring, and deployment topics of great value.

Camel’s features are focused on the enterprise business community and its needs, but it’s also a generic and very useful integration toolkit. Any Java developer who needs to send a message somewhere will probably find Camel and this book useful.

Code conventions

The code examples in this book are abbreviated in the interest of space. In particular, some of the namespace declarations in the XML configurations and package imports in Java classes have been omitted. We encourage you to use the source code when working with the examples. The line lengths of some of the examples exceed the page width, and in cases like these, the marker is used to indicate that a line has been wrapped for formatting.

All source code in listings or in text is in a fixed-width font like this to separate it from ordinary text. Code annotations accompany many of the listings, highlighting important concepts. In some cases, numbered bullets link to explanations that follow the listing.

Source code downloads

The source code for the examples in this book is available online from the publisher’s website at http://www.manning.com/CamelinAction, as well as from this site: http://code.google.com/p/camelinaction.

Software requirements

The following software is required to run the examples:

  • JDK 5 or better
  • Maven 2.2.1 or better
  • Apache Camel 2.5 or better

Apache Camel can be downloaded from its official website: http://camel.apache.org/download.html.

All the examples can be run using Maven. Chapter 1 shows you how to get started with Maven and run the examples.

Author Online

The purchase of Camel in Action includes free access to a private web forum run by Manning Publications, where you can make comments about the book, ask technical questions, and receive help from the authors and from other users. To access the forum and subscribe to it, point your web browser to http://www.manning.com/CamelinAction. This page provides information on how to get on the forum once you’re registered, what kind of help is available, and the rules of conduct on the forum.

Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the authors can take place. It is not a commitment to any specific amount of participation on the part of the authors, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking the authors some challenging questions, lest their interest stray!

The Author Online forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset