concept datum in category mule

appears as: data, data
Mule in Action, Second Edition

This is an excerpt from Manning's book Mule in Action, Second Edition.

Flows are the primary mechanism for building integration applications with Mule. A flow consists of a source of data followed by a series of message processors. A message begins its life from an inbound endpoint, which could be an HTTP POST or the scheduled polling of a database table, and is processed by the subsequent processors in the flow in the order in which they are defined. Flows support multiple invocation styles as defined by their exchange pattern. A one-way exchange pattern typically means the flow is asynchronous, for instance. The request-response exchange pattern means the flow will return a result. A flow can optionally end with an outbound endpoint, which sends the message to another flow or server.

Figure 2.9. Mule messages can contain data from any source.

A Mule transformer has a simple behavior, as illustrated by the flow chart in figure 4.1. As this diagram suggests, a transformer strictly enforces the types of data it receives and outputs. This can be relaxed by configuration; a transformer won’t report an exception for bad input but will return the original message unchanged, without enforcing the expected result type (return class). Therefore, use this option sparingly.

How do you compress data in Mule? Let’s suppose that you have to publish large strings to a JMS queue. The receiving consumer, which listens on this queue, expects you to compress the data before you send it. If you are in such a situation, the gzip-compress-transformer is the one you’re looking for. In the next listing, you’ll see how to use it.