Chapter 2. Processing messages with Mule

 

This chapter covers

  • What role flows play in Mule
  • How messages are created
  • The structure of Mule messages
  • The Mule Expression Language

Mule is a workhorse whose sole purpose in life is to move your messages around. It actually does way more than just moving messages: it’s also able to transform, enrich, and smartly route them. Picture a mail delivery service that would automatically rewrite letters in the preferred language of the recipient, while decorating them with illustrations that appeal to the culture of the addressee.

Where does such capacity come from? The answer is two words: control and abstraction.

Mule gives you complete control over the way messages flow through it. We said the word: Mule indeed uses flows as the main control structure in its configuration files. You’ve already seen a flow in the very first chapter of this book; it was used by Prancing Donkey to accept product registration data. In this chapter, you’ll learn more about flows and how they work, and the kind of control they give you when processing messages.

Mule also uses a set of abstractions that allows users to deal with complex message processing scenarios in a unified manner using consistent and generic artifacts. In this chapter, we’ll look into the abstractions that sit at the core of Mule, namely:

  • The Mule message
  • Message sources and processors
  • Exchange patterns
  • Endpoint URIs

2.1. Going with the flow

2.2. Interacting with messages

2.3. Exploring the Mule message

2.4. Speaking the Mule Expression Language

2.5. Summary

sitemap