Spring Integration-1 :Messaging Channels
The main components

Essentially in Spring Integration System or for that matter any Enterprise Application integration system, There are 2 major components , those are Producers also known as Senders and Consumers also known as Receivers and these 2 high level components communicate with each other they do so using pipes also called as channels.
In Spring Integration Prouducers and consumers are known as Endpoints and pipes are known as Channels and communication occurs via Messages through Channels.
Message contains Data information or some sort of event details.
To understand more on this, lets discuss another use case

You have an application that provides customer data and perhaps customer data provided in XML format, and there is some sort of consuming application which want this customer data but this application like to have customers who have contacted in last year(filtered contacts) and also consumer want this data in json format, here we can achieve it using filter in payload because payload contains data which has to be exchanged b/w applications.

There are many types of Message Endpoints
- Adapters (connect your channel to some other system)
- Filter (remove some messages from channels based on header, content, etc.)
- Transformer (convert a message content or structure)
- Enricher (add content to the message header or payload)
- Service activator (invoke service operations based on the arrival of a message)
- Gateway (connect your channels without SI coupling)
We will discuss each one of them in details
Message Channels
Two general classifications of message channels
- Pollable Channel
- Subscribable Channel
While there are many subtypes, they all implement at least one of these SI channel interfaces. see below link for details
http://docs.spring.io/spring-integration/reference/html/messaging-channels-section.html
Pollable Channel
- May buffer its messages
- Requires a queue to hold the messages
- The queue has a designated capacity
- Waits for the consumer to get the messages
- Consumers actively poll to receive messages
- Typically a point-to-point channel
- Only one receiver of a message in the channel
Subscribable Channel
- Allows multiple subscribers (or consumers) to register for its messages.
- Messages are delivered to all registered subscribers on message arrival
- It has to manage a list or registry of subscribers.
- Doesn’t buffer its messages
- Usually used for “event” messages
- Notifying the subscribers that something happened and to take appropriate action.
- Usually used for sending information or “document” messages between endpoints