When two independent applications need to exchange information, they can do so by transmitting data through a channel that connects the two.
The sending application may have no inclination or need to know which application will be receiving the data, however, it can influence the recipient through the selection of a specific channel for transmitting the data. With this approach, the sender does know that the receiver will be one that is connected to that channel with the intent of receiving precisely this type of information.
With this scenario, any application that produces data to be shared has a method to communicate with those that wish to consume it.
Different Message Channel Implementations
Fixed set of channels
One implementation variation is that the set of Message Channels available to an application will tend to be static and fixed. Therefore, when designing an application, a developer has to know where to put what types of data to share that data with other applications, and likewise where to look for what types of data coming from other applications.
It is understood that these communication routes cannot be created dynamically and discovered at runtime. They will need to be agreed upon during application design to allow each application to understand where its data is coming from and where the data is going.
Unidirectional channels
Another implementation decision is whether our channels will be defined as unidirectional or bidirectional. Actually, it’s neither; a channel really like a container that some applications add data to and other applications retrieve data from.
But because the data is in messages that travel from one application to another, that gives the channel direction, making it unidirectional. If a channel were bidirectional, that would mean that an application would both send messages to and receive messages from the same channel, which—while technically possible—makes little sense because the application would tend to keep consuming its own messages, the messages it’s supposed to be sending to other applications. So for all practical purposes, channels are unidirectional. As a consequence, for two applications to have a two-way conversation, they will need two channels,