Chapter 1. Structuring Routes

In this chapter, we will cover the following recipes:

  • Using Camel in a Java application
  • Embedding Camel in a Spring application
  • Using Camel components
  • Reusing routing logic by connecting routes
  • Asynchronously connecting routes
  • Spanning Camel contexts within a single Java process
  • Using external properties in Camel routes
  • Reusing endpoints
  • Reusing routing logic through template routes
  • Controlling route startup and shutdown

Introduction

This chapter will introduce you to the fundamentals of running Apache Camel inside your applications. You will learn how to make use of Camel's rich set of components, and how to structure routes in such a way that common integration logic is able to be reused without duplication. These topics will provide you with the foundation for developing integrations using the framework.

Tip

Downloading the example code

Complete examples for each of the code snippets are located at http://github.com/CamelCookbook/camel-cookbook-examples, and through your account on the Packt Publishing's website 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.

To try these examples for yourself, obtain the example code, and build it using Apache Maven 3.0 or newer (http://maven.apache.org). Use the following command from the top-level directory of the project. Complete instructions are also provided in the included README file.

# mvn clean install

The code for this chapter is contained within the camel-cookbook-structuring-routes module of the examples.

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

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