cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming messages from EM via CPI

AlexeyP
Participant
0 Kudos
711

Dear Experts,

We have a use case whereby we need to push changes from System A to System B. The current architecture, on a high level, looks like this - System A pushes changes to SAP Event Mesh via HTTP APIs. SAP CPI then gets these changes off Event Mesh (using AMQP adapter), enriches them with some additional data and then pushes them to System B (using REST or SOAP). To complicate this the order of messages is important. There are also limitations on what we can do with Systems A and B as they are legacy which limits us to the technologies we can use and changes we can make to them.

It all works well in an optimistic scenario but we’re trying to understand how we can handle errors when, for example, CPI->System B connection fails or System B goes down. In theory, we can put messages in a JMS queue in CPI first but then it means that we’re, in a way, duplicating what we are doing in Event Mesh. Other options would be a) to "republish" failed changes to EM again and then get them processed or b) use REST APIs instead of AMQP in CPI to read messages and only acknowledge (QoS=1) and delete them from the queue in EM once the message processing has been successfully completed by system B.

Has anyone implemented a similar use case and/or could recommend a way to resolve this?

I hope it all makes sense and any advice would be greatly appreciated.

Regards,

Alexey

Srinivas-Rao
Contributor
0 Kudos

Hi - Sorry I do not have the answer. but just to understand - if system A is a non-SAP system, how are you pushing events to event mesh ?

AlexeyP
Participant
0 Kudos

Yes, the integration is between two non-SAP systems and System A pushes messages to EM via REST APIs.

View Entire Topic
Tobias_Griebe
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi apalagin,

I assume that you already had a look into Mandy's blog on the usage of the AMQP adapter here?

You have the option in the CPI flow to reject the message in case of an error which would put it back to the Event Mesh queue. From here it can be processed again and you can keep the events in order. On the queue you have the option to define a Dead Message Queue where you move the failed events after a predefined number of retries.

Best regards,
Tobias

AlexeyP
Participant
0 Kudos

Thank you Tobias, yes, we're aware of the blog and currently working through it.

Regards,

Alexey