According to Enterprise Integration Patterns,message channel is a virtual data pipe that connects a sender to one or more receivers. The message channel decouples the sender and the receivers so the sender does not necessary know who will receive the messages.


There are two major types of message channels: point-to-point channels and publisher-subscriber channels.

EAI Message Channel Patterns



The message channel design pattern is very simple. The message contains a piece of information that needs to be passed between different components, which can either be in a process or across different applications in different servers. For example, a chain retail store inventory system can send a message with the string “Inventory is running low with Item #12345” to the corporate warehouse so it can send more inventory back to the store. Besides strings, a message can contain any data type that the applications can understand.



The message endpoints are the components that interact with the messages. The endpoint that sends messages to the message channel is called the sender or producer. The endpoint that receives message from the message channel is called the receiver or consumer



The sender puts the data into a message and the receiver takes the data out from the message. As a result, the sender and receiver need to understand the data that they are exchanging. Besides sender and receiver, the message endpoint can filter messages within a channel or route the messages to the other channel. Some message endpoints can even split a message into multiple messages and route them into different channels.

Point-to-Point Channel


The point-to-point channel guarantees that there is only one receiver that receives the same message from the sender at any given time. Spring Integration provides several types of point-topoint channel implementations: QueueChannel, PriorityChannel, RendezvousChannel, DirectChannel, ExecutorChannel, and NullChannel.






Publish-Subscribe Channel


The publish-subscribe channel allows one-to-many relationship between the producer
and consumer, such that multiple consumers may receive the same message. The message is marked as “received” and removed from the channel when all the subscribed receivers have consumed the message. Spring Integration currently provides a publish-subscribe–style message channel implementation, which is PublishSubscribeChannel.






Invalid Message Channel


When the application receives a message from the channel, the application may decide not to process the incoming message because the data within the message may not pass validation or the application may not support the incoming message data type. The message will be routed into the invalid message channel , allowing further handling by the other process/application








Dead Letter Channel


When an application fails to deliver a message to the message channel after all the retry attempts, the message will be sent to the dead letter channel and will be handled further by the another process or application listening for messages on that channel














Channel Adapter

The channel adapter allows an application to connect to the messaging system. Most applications are not designed to communicate with a messaging system in the first place. By using a common interface or application programming interface (API), applications can be easily integrated with different messaging system implementations.







Messaging Bridge

A messaging bridge is a relatively trivial endpoint that simply connects two message channels or channel adapters . For example, the developer may want to connect a PollableChannel to a SubscribableChannel so that the subscribing endpoints don’t have to worry about any polling configuration. Instead, the messaging bridge provides the polling support







Leave a Reply

Subscribe to Posts | Subscribe to Comments

About This Site

Howdy! My name is Suersh Rohan and I am the developer and maintainer of this blog. It mainly consists of my thoughts and opinions on the technologies I learn,use and develop with.

Blog Archive

Powered by Blogger.

- Copyright © My Code Snapshots -Metrominimalist- Powered by Blogger - Designed by Suresh Rohan -