concept channel adapter in category java

appears as: chnel adapters, channel adapter, chnel adapter, chnel adapter, The chnel adapters, chnel adapters, The chnel adapter, A chnel adapter
Spring Integration in Action

This is an excerpt from Manning's book Spring Integration in Action.

Message endpoints are the components that actually do something with the message. This can be as simple as routing to another channel or as complicated as splitting the message into multiple parts or aggregating the parts back together. Connections to the application or the outside world are also endpoints, and these connections take the form of channel adapters, messaging gateways, or service activators. We discuss each of them later in this section.

As you might guess from the table, there are some naming conventions for endpoints. Wherever possible, the names were chosen to closely mirror a corresponding pattern name. In addition, the properties are signified by consistently applied tokens. For example, a gateway is always capable of bidirectional communication. This doesn’t change between HTTP and JMS or between inbound and outbound. In contrast, a channel adapter is always unidirectional: it’s either the beginning (inbound) or the end (outbound) of a message flow. Now that you know the choices you can make before selecting an endpoint, it’s time to look into the implications of those choices. First we ask what may be the most important question when designing a messaging system.

The previous examples all assume unidirectional communication. Endpoints using this style of communication are called channel adapters. Unidirectional communication is often enough to establish a working solution, but bidirectional requirements are common. For these scenarios, you can use gateways. The EIP definition of gateway isn’t as clear as we would’ve liked, so we did a bit of interpretation. Mainly, the lack of clear distinction between synchronous invocation and asynchronous handoff makes the gateway concept too broad and widely overlapping with other concepts, such as channel adapter. In Spring Integration, a gateway is synonymous with synchronous two-way communication. If you need an asynchronous gateway, you should compose it from other base components (for example, an inbound and outbound channel adapter).

Figure 10.1. Sending email requires a channel adapter and includes optional transformers for preparing outbound messages.