Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: overhaul of the tutorial

 

Warning

This tutorial is a work in progress. Any additions, corrections or feedback very much appreciated. Please use the comment box if making a correction explaining the mistake.

...

  • Embellish the tutorial with more detail, explaining at each stage what is happening.
  • Link to specific sections of Camel documentation when referring to components.
  • Attach completed example project.
  • Explain in more detail what is happening when the JMS component is being defined in camel-server.xml
  • Show how logging can be introduced to monitor exchange body contents.
  • Detail how time-outs can be configured.
  • Show how to catch lost messages.
  • Show how to use a wiretap.
  • Can we make this ActiveMQ embedded so that it does not require the reader to download and start it manually?
  • EIP Patterns used
  • Components used
  • Advanced bean bindings in routing
  • Testing using unit testing and integration testsDemo of dead letter

Prerequisites

This tutorial uses Maven to setup the Camel project and for dependencies for artifacts.

...

The Server is a JMS message broker that routes incoming messages to a business service that does computations on the received message and returns a response.
The EIP patterns used in this sample are:

Pattern

Description

Message Channel

We need a channel so the Clients can communicate with the server.

Message

The information is exchanged using the Camel Message interface.

Message Translator

This is where Camel shines as the message exchange between the Server and the Clients are text based strings with numbers. However our business service uses int for numbers. So Camel can do the message translation automatically.

Message Endpoint

It should be easy to send messages to the Server from the the clients. This is archived with Camels powerful Endpoint pattern that even can be more powerful combined with Spring remoting. The tutorial have clients using each kind of technique for this.

Point to Point Channel

We using JMS queues so there are only one receive of the message exchange

Dead Letter Channel

Camel has a default Dead Letter Channel where messages that couldn't be delivered or processed stored.

Event Driven Consumer

Yes the JMS broker is of course event driven and only reacts when the client sends a message to the server.

We use the following Camel components:

Component

Description

ActiveMQ

We use Apache ActiveMQ as the JMS broker on the Server side

Bean

We use the bean binding to easily route the messages to our business service. This is a very powerful component in Camel.

File

In the AOP enabled Server we store audit trails as files.

JMS

Used for the JMS messaging

...