Chapter 3. Routing to Your Code

In this chapter, we will cover the following recipes:

  • Routing messages directly to a Java method
  • Sending messages directly to a Camel endpoint
  • Using a Java method as a Predicate
  • Writing a custom Camel Processor
  • Mapping the message to method parameters
  • Writing a custom data marshaller
  • Writing a custom data type converter

Introduction

In this chapter, we will be looking at a number of ways of extending Camel with your own Java code, and invoking Camel routes from your Java code.

Camel was designed to make it very easy to work with existing Java code, and to make it straightforward to invoke Camel through your code without a lot of boilerplate code typically involved in using the underlying technologies such as JDBC, JMS, and ...

Get Apache Camel Developer's Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.