Technical Articles
EIPinCPI – Datatype Channel
Previous – Publish-Subscribe Channel | Index | Next – Invalid Message Channel
This week, we’ll study a pattern known as Datatype Channel.
When do I use this pattern?
Datatype Channel is the most common type of channel. Datatype Channel, as the name suggests, represents a Message Channel for a given Datatype, for example, a channel for Invoices is a Datatype Channel dedicated to Invoice data, a channel for Orders is a Datatype Channel dedicated to Order data. In this blog, I’ll demonstrate Datatype Channel by creating channels for Invoices and Orders.
Datatype Channel in CPI
Integration Flow – Orders Datatype Channel
Orders Datatype Channel
This integration flow can be invoked by triggering an IDoc from an ECC system. The integration flow puts the received IDoc in an ‘Orders’ queue.
Configuration of IDoc Sender Adapter:
Tab | Property | Value |
---|---|---|
Connection
|
|
/ORDERS05 |
Configuration of JMS Receiver Adapter:
Tab | Property | Value |
---|---|---|
Processing
|
Queue Name
|
Orders |
Processing
|
Encrypt Stored Message
|
Unchecked |
The receiver looking to get Orders data can be 100% sure that the data in the channel ‘Orders’ will always be Orders IDocs.
Integration Flow – Invoices Datatype Channel
Invoices Datatype Channel
Similarly, this integration flow can also be invoked by triggering an IDoc from an ECC system. The integration flow puts the received IDoc in an ‘Invoices’ queue.
The config simply changes to create an invoice specific datatype channel.
Configuration of IDoc Sender Adapter:
Tab | Property | Value |
---|---|---|
Connection
|
|
/INVOIC02 |
Configuration of JMS Receiver Adapter:
Tab | Property | Value |
---|---|---|
Processing
|
Queue Name
|
Invoices |
Processing
|
Encrypt Stored Message
|
Unchecked |
Similar to Orders Channel, the receiver looking to get Invoices data can be 100% sure that the data in the channel ‘Invoices’ will always be Invoices IDocs.
EIPinCPI Rating – 10/10
As the JMS is supported in CPI, creating Datatype Channels is as easy as configuring JMS Receiver Adapter. Therefore, the EIPinCPI rating for this pattern is 10/10.
Conclusion
Datatype Channels is a great way of structuring channels. A Datatype Channel contains the messages pertaining to a single datatype, thereby simplifying the processing on the receiver side.
References/Further Readings
- Datatype Channel Pattern in Enterprise Integration Patterns
- EIPinCPI
- CPI Components
Hope this helps,
Bala
Previous – Publish-Subscribe Channel | Index | Next – Invalid Message Channel