Book Image

Spring Integration Essentials

By : CHANDAN K PANDEY
Book Image

Spring Integration Essentials

By: CHANDAN K PANDEY

Overview of this book

Table of Contents (18 chapters)
Spring Integration Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Content enrichers


While enabling interaction between heterogeneous systems, it might be necessary to augment the message with additional information so that it can be successfully processed by the next set of consumers. Let's take an example where in a batch processing environment, it might be necessary to attach priority information onto the incoming tasks. It is for a message that is put on a file server for external consumption—a timestamp indicating the max time for which the file would be kept should be added. There could be several such scenarios where the incoming message is incomplete and is to be processed by the next endpoint. Content enricher is a specialized form of transformer, which can attach additional information to the message. In the context of Spring Integration, the message consists of two parts—header and message payload. Spring Integration exposes a way to enrich either of these components.

Header enrichers

Header in Spring Integration is an instance of the MessageHeaders...