Asynchronous Message Handling with SAP HANA Cloud Integration

  • by Dr. Volker Stiehl, Professor, Ingolstadt Technical University of Applied Sciences
  • March 14, 2016
See how to use SAP HANA Cloud Integration (SAP HCI) for modeling asynchronous integration scenarios. You use an asynchronous interface defined in a WSDL file for the configuration of the Simple Object Access Protocol (SOAP) channel to specify the asynchronous nature of the communication. Once the message processing is completed, the resulting message is forwarded asynchronously to an email receiver. Learn about the message monitor, which tracks down message handling in SAP HCI.
Learning Objectives

By reading this article you will:

  • Know how to benefit from asynchronous message processing in your SAP HANA Cloud Integration (SAP HCI)-based scenarios
  • Understand what is necessary to configure the Simple Object Access Protocol (SOAP) channel correctly to deliver messages asynchronously to the SAP HCI server
  • Learn how to add an asynchronous receiver to your integration flow
  • Understand how to track message handling within SAP HCI using the message monitor
Key Concept

Every major integration project requires functionality to work with asynchronous communication. Therefore, integration solutions such as SAP HANA Cloud Integration (SAP HCI) must provide features to receive as well as deliver messages asynchronously. Asynchronous communication is more important in messaging scenarios in which a sender delivers a message to the integration server and relies on the server’s capabilities to reliably deliver the message on the receiver’s side. No connections are being kept open during such a message exchange. This is a major difference to synchronous scenarios in which the connections on the sending as well as the receiving side (with the integration server in-between) are kept open during the complete communication.

SAP HANA Cloud Integration (SAP HCI) is a cloud-based solution for connecting on-premise as well as on-demand enterprise applications with each other. Its core task is the routing of messages across a company’s distributed IT landscape, including the connectivity to partners and suppliers. Such integration scenarios can be synchronous or asynchronous in nature. Synchronous message handling follows this basic procedure:

1. A sender opens a connection to SAP HCI and sends a request message.

2. After sending the request message to SAP HCI, the sender does not close the connection because a reply is expected.

3. SAP HCI finds the receiver for the respective request message (e.g., by inspecting the message’s content), opens a connection to the receiver, and routes the message to the receiver.

4. After sending the message to the receiver, SAP HCI does not close the connection either.

5. The receiver acts on the request message by creating a response message and returns it to SAP HCI via the still opened connection.

6. After SAP HCI receives the message, it closes the connection to the receiver and routes the received message as a reply message to the original sender.

7. The sender can now close the connection to SAP HCI after receiving the final reply message.

Obviously, the connection from the sender to SAP HCI and the connection from SAP HCI to the receiver are still open as long as the message processing is ongoing. The communication involves a bidirectional message transfer in one session. This message handling procedure significantly differs from the following asynchronous message handling procedure:

1. A sender opens a connection to SAP HCI and sends a message.

2. After SAP HCI receives the message correctly, it acknowledges its reception to the sender.

3. After receiving the acknowledgment from SAP HCI, the sender closes the connection.

4. SAP HCI opens a connection to the receiver of the message and forwards it accordingly.

5. After receiving the message completely, the receiver acknowledges the message’s reception to SAP HCI.

6. After receiving the acknowledgment from the receiver, SAP HCI closes the connection.

The connections are immediately closed as soon as the receiving parties confirm the messages. The overall communication just involves the message transfer in one direction. These are in short the main differences between synchronous and asynchronous communication.

How does this information affect the discussion about SAP HCI? First, SAP HCI has to support both communication styles as it is a general-purpose integration infrastructure that is prepared for all kinds of integration requirements. However, in the articles I have written so far in this series, all communications were synchronous. These articles have been useful so far because you were able to see the immediate results of the integration flow invocations in the Simple Object Access Protocol (SOAP) clients that were used to call the message handling chains. Now the time has come to take a closer look at asynchronous message handling and how to influence the communication style.

You will learn more about the inner working of SAP HCI during message processing and how the system determines whether a scenario is synchronous or asynchronous. The SOAP channel is used as an example to explain the differences between synchronous and asynchronous message delivery to the SAP HCI server. On the receiving side, the email adapter will be introduced to allow asynchronous message reception. Finally, the message monitor is used to help you understand how SAP HCI handles your messages during the execution of your integration flows.

Dr. Volker Stiehl

Prof. Dr. Volker Stiehl studied computer science at the Friedrich-Alexander-University of Erlangen-Nuremberg. After 12 years as a developer and senior system architect at Siemens, he joined SAP in 2004. As chief product expert, Volker was responsible for the success of the products SAP Process Orchestration, SAP Process Integration, and SAP HANA Cloud Integration (now SAP HANA Cloud Platform, integration service). He left SAP in 2016 and accepted a position as professor at the Ingolstadt Technical University of Applied Sciences where he is currently teaching business information systems. In September 2011, Volker received his Ph.D. degree from the University of Technology Darmstadt. His thesis was on the systematic design and implementation of applications using BPMN. Volker is also the author of Process-Driven Applications with BPMN as well as the co-author of SAP HANA Cloud Integration and a regular speaker at various national and international conferences.

See more by this author


No comments have been submitted on this article. 

Please log in to post a comment.

To learn more about subscription access to premium content, click here.