This week, we’ll study a pattern known as Messaging Bridge.
When do I use this pattern?
Messaging Bridge pattern is used to connect two messaging systems. Connecting entire messaging systems to each other is a huge task, so, only channels are connected to each other.
Messaging Bridge in CPI
Usually, Messaging Bridge is simply a Channel Adapter. In CPI, the way to connect other messaging systems is using AMQP Adapter.
Integration Flow – Receiving Data into CPI
To receive data in CPI, we simply connect with queues in the other system using AMQP Sender Adapter like so:
Receiving Data into CPI
The Configuration of AMQP Sender Adapter will look like below:
In this sample flow, I am simply logging the payload. In a real scenario, the next steps could include Message Translation, Routing, and so on.
Integration Flow – Sending Data out of CPI
To send data out of CPI, we simply connect with queues in the other system using AMQP Receiver Adapter like so:
Sending Data out of CPI
The Configuration of AMQP Receiver Adapter will look like below:
In this simple flow, we have exposed sending data to another messaging system using ProcessDirect Sender Adapter.
EIPinCPI Rating – 8/10
The messaging bridge in CPI relies on other middleware software to implement AMQP. And, there isn’t a dedicated message bridge adapter. Therefore, CPI is rated 8 out of 10 for the implementation of the Messaging Bridge pattern.
Messaging Bridge is used to connect two messaging systems to each other. In CPI, AMQP Adapter can be used to achieve this.
Hope this helps,
About the Author
More Content by Bhalchandra Wadekar