Understanding Message communication patterns for Application Integration

Transfer of messages between connected applications and systems plays primary role in Enterprise Application Integration as its the sole purpose that integration platform serves sitting in between the entire network of connected applications. When it comes to the pattern of communication to be followed; there are several choices that can be considered to meet the business needs in efficient and desired manner. In this post, I will briefly talk about such messaging patterns that are applicable to Enterprise application integration.

Synchronous message communication:

Synchronous communication is a messaging pattern in which the communicating parties transfer message with each other in one session in a blocking mode where the producer of the message waits for the response/acknowledgement from the message consumer before closing the session. Request-Response based communication between the parties is based on synchronous messaging pattern. There are dozens of scenarios where this mode of communication becomes a preferred choice for integration solutions.

When to use synchronous messaging for Enterprise Application Integration solutions?

As described above, request and response are shared between the producer and the consumer in the same session in synchronous mode, this approach is more suitable for scenarios where real-time interaction with minimal delays is needed between the applications/systems. Synchronous transfer of messages between the systems is required when subsequent actions are dependent on the response received for the previous message transferred and further actions need to be performed in sequential manner.

Example Scenario for Synchronous Messaging:

Consider a scenario where a customer is using bank’s ATM machine to withdraw some cash. In this scenario, ATM machine needs to interact with the back-end system in synchronous manner to check the available balance so that the customer is informed in the same session if he is eligible to withdraw the money or not. For this type of scenarios involving real-time communication, synchronous message communication pattern is used.

Below image shows how synchronous message communication takes place between two communicating parties:

Asynchronous message communication:

Asynchronous message communication is just opposite to the synchronous one as in this mode of communication, producer doesn’t wait for the consumer to respond back in the same session and there is no blocking in the session. Producing application/system just closes the session after sending the message for the consumer application. Consumer application can handle and process the request in its own convenience and can take any further action required (e.g. sending a delayed response back to the producer through another interface exposed by the producer or just perform any additional actions in some other system). Fire & forget, Publish Subscribe are considered asynchronous messaging modes widely used in integration platforms.

When to use Asynchronous messaging for integration solutions?

Asynchronous communication mode is preferred in scenarios where large/bulk data needs to be transferred between the communicating systems and there is no need of real-time responses. Since Asynchronous messaging is non-blocking by nature, larger amount of data can be transferred in parallel sessions using this mode.

Example Scenario for Asynchronous Messaging:

Consider a scenario where a ERP system needs to broadcast/publish some information so that any interested parties can subscribe to that and get the updates. In this scenario, ERP system will just publish the data to a messaging layer destination (e.g. EMS Topic) and it will not wait for any responses from the parties consuming/subscribing to those messages. For this type of scenarios, asynchronous communication is a preferred choice.

Below image shows how Asynchronous message communication takes place between two communicating parties:

Ajmal Abbasi

Ajmal Hussain Abbasi is Integration Consultant By Profession with 13+ years experience in Integration domain mainly with TIBCO products. He has extensive practical knowledge of TIBCO Business Works, TIBCO Cloud, TIBCO Flogo, TIBCO Mashery, TIBCO Spotfire, EMS and TIBCO ActiveSpaces. He has worked on a number of highly critical integration projects in various sectors by using his skills in TIBCO Flogo, TIBCO API Management (Mashery), TCI, Tibco Designer, TIBCO Business Studio, Adapters, TIBCO EMS, RV, Administrator, TIBCO BE, TIBCO ActiveSpaces etc. Ajmal Abbasi has experience with MuleSoft ESB as well. Ajmal Abbasi is also experienced in the area of API Management particularly with WSO2 API management platforms. Ajmal Abbasi is also experienced in developing solutions using Core Java and J2EE Technologies. You can contact Ajmal Abbasi for Consultancy, Technical Assistance and Technical Discussions.

More Posts - Website - Facebook - LinkedIn - YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *