2. • The Mule message is the data that passes
through an application via one or more flows.
It consists of two main parts:
• the message header, which contains metadata
about the message
• the message payload, which contains your
business-specific data.
3. • A Mule message is, itself, embedded within
a Mule message object. Some Mule message
objects may contain variables, attachments,
and exception payloads. However, as
attachments and exception payloads are not
frequently used or manipulated, this overview
document does not include details about
them.
4. Properties and Variables
• The metadata contained in the message header
consists of properties which provide useful information
about the message. Contained within the message
object, variables represent data about a message.
• Properties and variables share a common format: each
individual property or variable has a name and a value.
The name is how you refer to the property or variable
in Mule, and the value is the information stored within
it. Thus, the name is like a key to a door and the value
is the material behind the door.
5. • A message's properties and variables have
specific scopes that define and organize how
they apply across that message's
lifecycle. Properties send metadata along with
a message in order to facilitate processing and
avoid errors when the message crosses the
transport barrier – either by entering a new
flow or by being transmitted to another
application.
6. • Properties have two main
scopes: inbound and outbound.
• Inbound properties are immutable, are
automatically generated by the message
source and cannot be set or manipulated by
the user. They contain metadata specific to
the message source that prevents scrambling
of data formats or other processing mishaps
later in the message's lifecycle.
7. • Outbound properties are mutable; they are
set during the course of a flow and can
become inbound properties when the
message passes from the outbound endpoint
of one flow to the inbound endpoint of a
different flow via a transport. They contain
metadata similar to that of an inbound
property
8. Variables are user-defined metadata about a
message. Variables have three scopes:
• Flow variables apply only to the flow in which
they exist.
• Session variables apply across all flows within
the same application.
• Record variables apply to only to records
processed as part of a batch.
9. Message Payload
• The message payload is the most important
part of the Mule message because it contains
the data your Mule application processes. You
may apply metadata in the message header or
message object to communicate information
about your message or secure it from being
tampered with, but the core of the message –
the data you are transporting – is the reason
the message exists in the first place.
10. • The payload doesn't necessarily stay the same
as it travels through a flow. Various message
processors in a Mule flow can affect the
payload along the way by setting it, enriching,
or transforming it into a new format. You can
also extract information from a payload within
a flow using a MEL expression.