Preface
The world is becoming more connected than ever. There are hundreds of APIs on the Cloud, and more are added every day. Integrating existing systems, creating new applications, which can communicate easily with other applications, is becoming part of the everyday job of developers. Mastering an integration framework like Apache Camel, that can connect to a variety of systems and do message orchestration using well-known Enterprise Integration Patterns, is essential for any software engineer.
What this book covers
Creating a Camel project (Simple) provides a high-level overview of Camel architecture, and demonstrates how to create a simple message driven application.
Routing messages to different destinations (Simple) explains the message structure in Camel, and how to use it for routing messages with a Content-Based Router pattern.
Using components (Simple) shows how Camel utilizes URLs to configure components, and connect to a variety of systems.
Connecting routes (Simple) covers Message Exchange Patterns in Camel, and connecting routes with other parts of the applications.
Removing unwanted messages (Simple) introduces Message Filter and Idempotent Consumer patterns along with the powerful Bean Binding feature.
Transforming messages (Intermediate) demonstrates a variety of ways in which message transformations happens in Camel applications.
Splitting a message into many (Intermediate) presents the Splitter pattern and how the Camel threading model works.
Aggregating multiple messages into one (Intermediate) shows the Aggregator pattern and its usage in other patterns, such as Scatter-Gather and Composed Message Processor.
Reorganizing messages (Intermediate) introduces three more patterns used for changing the message order and frequency: Resequencer, Throttler, and Delayer.
Multicasting messages (Intermediate) shows how to send a message to multiple recipients using Recipient List and Wire Tap patterns.
Error handling and monitoring (Advanced) explains the Dead Letter Channel pattern, and the different techniques used in Camel for monitoring and dealing with errors.
Testing the messaging applications (Advanced) presents the different tools provided by Camel for testing the routing logic.
What you need for this book
In order to run the examples accompanying this book, you will need Java 6 or higher, Apache Maven 2.2.1 or higher, and Apache Camel version 2.11 or higher.
Who this book is for
This book is intended for Java developers who are new to Apache Camel and message oriented applications. It shows how to do application integration using the industry standard Enterprise Integration Patterns.
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "In the Java DSL, we create a route by extending RouteBuilder
and overriding the configure
method."
A block of code is set as follows:
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency>
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <feedback@packtpub.com>
, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you. You can also download the example code files for this book from github at https://github.com/bibryam/camel-message-routing-examples.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <copyright@packtpub.com>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions
You can contact us at <questions@packtpub.com>
if you are having a problem with any aspect of the book, and we will do our best to address it.