Chapter 5. Transformers
Introduction
Not all applications understand the data they consume. Sometimes the messages need to be transformed before they can be consumed to achieve a business purpose. For example, a producer uses a Java Object as its payload to produce a message, while a consumer is interested in non-Java Object types like plain XML or name-value pairs.
To help the producer and consumer communicate, transformers are used to transform Java Object to non-Java Objects. The Spring Integration framework provides the transformer components that do exactly what is required. This chapter looks in detail at the transformation endpoints provided by the framework.
First, we will discuss the transformers like
Object-to-String or Object-to-Map
transformers, which come out of the box from the Spring Integration
framework. We then discuss the ways to create our own transformers if the
built-in ones are inadequate.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access