Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
BarisBuyuktanir
Explorer
"Recently, SAP released a new Integration Suite adapter for Advanced Event Mesh. This adapter enables Integration Suite developers to manage connectivity and integration flow scenarios more effectively, facilitating tighter integration with Advanced Event Mesh than was previously possible."

You can configure the adapter for sending and receiving messages to and from Advanced Event Mesh:
  • Sender Adapter for receiving messages from Advanced Event Mesh.
  • Receiver Adapter for sending messages to Advanced Event Mesh.

While there is already an AMQP Adapter available for Integration Suite, which you can use to employ AMQP as a protocol, the AEM Adapter is specifically tailored to the Advanced Event Mesh Broker.
This adapter utilizes the Solace Message Format (SMF) as the specific message protocol for Solace.

According to the documentation, the main features include the following:

Sender:

  • Consume Guaranteed (persistent) messages from an advanced event mesh queue 
  • Consume Direct (non-persistent) messages using a Topic Subscription
  • Number of Parallel Consumers
  • Choice of Acknowledgement Mode
  • Adapter-level message retry properties

Receiver:

  • Publish Guaranteed (persistent) messages to a Topic (recommended) or Queue in advanced event mesh
  • Publish Direct (non-persistent) messages to a Topic in advanced event mesh
  • Destination can be dynamically set at runtime via header or property expression
  • Support for multiple message payload types: Text, Byte, Map message types
  • Turn publish into a request/reply “Requestor” that send a message to the Destination, sets ReplyToAddress and CorrelationID, and synchronously waits for a response
  • Set User Properties on outgoing message
  • Set SMF message properties such as Priority, DMQ Eligible, and CorrelationId on outgoing message

Connection with advanced event mesh broker:

  • Connect to any broker
  • Support for various authentication modes such as Basic, Client Certificate, OAuth2
  • Support for setting less common connection properties

Additional details about the Advanced Event Mesh adapter for SAP Integration Suite are available on the help pages, which can serve as a more detailed reference.

I think this information is sufficient enough to start with, therefore, we can proceed with a practical example both explaining and demonstrating some of these features.

SCENARIO

  • We will create an Integration Flow both receiving and sending messages from and to Advanced Event Mesh.
  • The Integration Flow will consume messages through a Queue (guaranteed message) from Advanced Event Mesh and it will be publishing the same message (of course you have the option to modify payload and everything) to a topic endpoint of Advanced Event Mesh again. 
  • We will demonstrate the retry capabilities of the adapter, therefore we will simulate an error case to trigger the retry attempts. 

THE INTEGRATION FLOW

Below you can see the Integration Flow in general, including only the necessary simple steps to demonstrate the behaviour and logic. 

 

AEM Adapter Demo iFlowAEM Adapter Demo iFlow

SENDER ADAPTER DETAILS

For the sender adapter connection & processing details are as follows:

Sender Adapter - Connection DetailsSender Adapter - Connection Details

Sender adapter processing detailsSender adapter processing details

 

 

 

 

 

 

 

 

 

 

 

 



Except the connection details; below parameters are the ones that I found worth going into details

  • Authentication Type: We use the Basic Authentication for simplicity. We can make use of the secure store for password to keep as Secure Parameter. Other than Basic Authentication, you have the option to use Client certificate and OAuth2 Authentication.
  • Consumer Mode : Direct for non-persistent messages and Guaranteed for persistent messages 
  • Retry Parameters: 
    • Maximum Message Processing Attempts determines how many times the adapter tries to process the message. In our case we set it 3 to allow iFlow to try x3 times.
    • Retry Interval (in ms) :  When using more than 1 maximum message processing attempts, Integration Flow will try in these intervals (depending on the Exponential Backoff Multiplier it determines the next timing of the retry) 
    • Exponential Backoff Multiplier  The multiplier to apply to the current time interval delay after every subsequent retry of a message. 1 means fixed delay.

In our current setup, we will receive and consume persistent messages from the queue using basic authentication. The password has been stored securely in Cloud Integration secure store. For retry attempts, the first attempt will occur within 3 seconds, followed by a second attempt within 6 seconds after the first. The timing of these attempts is like below.

Timing of the failed/retried attemptsTiming of the failed/retried attempts






RECEIVER ADAPTER DETAILS

For the receiver adapter connection & processing details are as follows:

Receiver Adapter- Connection DetailsReceiver Adapter- Connection DetailsReceiver Adapter- Processing DetailsReceiver Adapter- Processing DetailsReceiver Adapter- Message Properties DetailsReceiver Adapter- Message Properties Details

 

 

 

 

 

 

 

 

 

 

 

 

 

 




There are similar parameters in the receiver adapter. Additional ones we have used are as follows:

  • Application Message ID: We can use this ID for tracking purposes. It's a string for an application-specific message identifier  

  • Sender ID : For identifying the sender (tracking purposes for end-to-end messaging)
  • User Properties : You can also set additional parameters (User Properties), which are basicly key-value pair header values. These user properties to be carried in the message separate from the payload.

As per our current setup,  I put "SENDER-CIS_AEM_ADAPTER_DEMO_FLOW" as sender ID and use Integration Suite, Cloud Integration  to generate a ApplicationMessageID. This ID includes a timestamp in order to make it unique. I am expecting these values to be present while monitoring of the messages. 

IFLOW PROCESSING STEPS' DETAILS

  • In the iFlow, in order to simulate an error situation, I send a header value (bberror) from Postman (which will eventually be attached as a property to my message from Sender Adapter / Queue)
  • If this value is true (meaning I will simulate error case), the iFlow retries receiving the message based on the retry parameters provided. After multiple retries; it fails again in our case and Advanced Event Mesh moves the message to a DMQ for further processing.
  • For the inbound message to the iFlow, I also generate a MessageID from Postman and send it to AEM in order to track the messages since the first one. The same ID will also be assigned as the correlationID for the rest of the steps. 

Postman - AEM Inbound Message HeaderPostman - AEM Inbound Message HeaderSetting up properties to use in the flowSetting up properties to use in the flowRouting (for Error or Success case)Routing (for Error or Success case)

 

 

 

 



 



After all these are done, eventually the results will be as follows:

  • Successful path (when bberror is set to false): iFlow will receive the message from AEM adapter and publish the same message to a topic (which leads to a queue in my case) 
    Successful Message To iFlow-PayloadSuccessful Message To iFlow-PayloadSuccessful Message To iFlow-PropertiesSuccessful Message To iFlow-Properties







    Successful Message from iFlow (Properties)Successful Message from iFlow (Properties)







  • Error path (when bberror is set to true): iFlow tries to process the message 3x attemps in different intervals(based on the configuration), and finally the message is moved to a dead message queue for further processing.
    Error Message in DMQ (Properties)Error Message in DMQ (Properties)Error (retry attempts)Error (retry attempts)



 

 

 

"SAP Integration Suite adapters provide a means to connect various systems, applications, and data sources within an organization's landscape. They facilitate interoperability and seamless communication between different technologies and systems. While Advanced Event Mesh could be connected via various generic protocols/methods including AMQP, REST, etc., for which Cloud Integration already has adapters, the release of the Advanced Event Mesh adapter for SAP Integration Suite enhances the connectivity and communication capabilities between these two solutions. This enables both SAP and non-SAP ecosystem to benefit from tighter integration and improved communication in multiple Event-Driven and Hybrid Integration use cases."


I hope the information and samples provided will guide you in using the Advanced Event Mesh Adapter and exploring a variety of event-driven scenarios. Below, you can also find links to my other blogs, mentioning other useful features and capabilities of SAP Advanced Event Mesh.

 

 

 

 

2 Comments
Labels in this area