Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The outbound JDBC adapters are used to execute SQL queries in the
database. The SQL query is constructed with the appropriate value
fetched from the incoming Message. So, the outbound adapter listens
on a message channel, picks up a message, extracts the relevant values,
constructs the query and executes the query on the Database.
Let’s look at an example where every Trade
message appearing on a trade-persistence-channel should be persisted. Under normal
circumstances, we could have written a consumer that picks up each
message and then uses persistence mechanics to store the message in the
database. However, Spring Integration’s outbound adapter saves you from
writing this extra code.