Book Image

Mastering Apache Camel

By : Bilgin Ismet Ibryam, Jean Baptiste Onofre, Jean-Baptiste Onofré
5 (1)
Book Image

Mastering Apache Camel

5 (1)
By: Bilgin Ismet Ibryam, Jean Baptiste Onofre, Jean-Baptiste Onofré

Overview of this book

Table of Contents (15 chapters)
Mastering Apache Camel
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Messaging channels EIPs


Messaging Channel EIPs gather all the patterns moving data from one point to another, using a communication channel.

Point To Point Channel

The Point To Point Channel EIP ensures that only one receiver consumes a message.

In Camel, the support of this EIP is dedicated to the components.

Some components are designed to implement and support this EIP.

For instance, this is the case for:

  • The SEDA and VM components, for communication between routes

  • The JMS component, when working with JMS queues

To illustrate the Point To Point Channel EIP, we create three routes using the Camel Blueprint DSL:

  • The first route starts with a timer and produces a message in a JMS queue

  • The second and third routes consume messages from the JMS queue

We will see that one message will only be consumed by one consumer route.

We create the following route.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">

  <bean id="amqConnectionFactory...