Migration from Mulesoft to Kumologica — Broadcast Pattern

Kumologica
3 min readMay 4, 2021

--

Mulesoft has 5 popular data integration patterns .

  • Broadcast pattern
  • Bi-direction Sync pattern
  • Correlation pattern
  • Aggregation
  • Migration

As part of this series we will be analysing and migrating the Mulesoft application which follows each of the above mentioned patterns to Serverless world using Kumologica. In this article we will focus on Broadcast pattern.

For those who are new to Kumologica I would recommend to go through our articles and youtube videos to get an insight. 

What is Broadcast pattern?

Broadcast pattern is the one way sync of data from one source to multiple destinations in realtime or near realtime basis.

Broadcast pattern

Mulesoft flow with broadcast pattern

In Mulesoft the broadcasting pattern is achieved using Scatter-Gather routing event processor. The scatter-gather processor sends a reference of mule event to each routing path configured within the scatter-gather block. On successful completion of each route it combines the events from each processing route into a new event that is passed to the next event processor.

Mulesoft flow implementing simple broadcast pattern

In the above Mulesoft flow we have HTTP listener which receives the payload from a client. The payload received is send to 3 systems (SystemA, SystemB and SystemC) . The final aggregated the response from all the 3 systems are captured and passed to a logger (Log_CallComplete) to print. In Mulesoft aggregated response is by default set into #[payload].

Kumologica flow with broadcast pattern

Now let’s see how the same implementation can be achieved in serverless world using Kumologica. In Kumologica, the broadcast pattern is achieved using scatter and gather nodes similar to Mulesoft. The scatter node will send a copy of the payload to all the routes wired to it. On completion of the process in each routes the final aggregated response will be collected by the gather node and passed on to the next node.

Kumologica flow implementing simple broadcast pattern

In the above Kumologica flow we have Eventlistener node which receives the payload from a client. A copy of the payload received is send to 3 systems (SystemA, SystemB and SystemC) . The final aggregated the response from all the 3 systems are captured and passed to a logger (Log_CallComplete) to print. In Kumologica, the aggregated response is by default set into msg.payload.

The final aggregated response structure under msg.payload would look as given below.

msg.payload
- parts
- 0
{
"sysaresponse" : {}
}
- 1
{
"sysaresponse" : {}
}
- 2
{
"sysaresponse" : {}
}

In the above given parts structure 0 ,1, & 2 represents the response from SystemA , B & C respectively.

Conclusion

This article has shown how similar the implementation style of broadcast pattern in Kumologica when compared to Mulesoft.

Remember Kumologica is totally free to download and use. Go ahead and give it a try, we would love to hear your feedback.

--

--

Kumologica
Kumologica

Written by Kumologica

Kumologica is the first low-code development solution that makes your integration services run on serverless compute regardless the cloud provider.

No responses yet