a month ago - last edited a month ago
Hello Everyone,
I am working on a proof of concept (PoC) where we have configured Advanced Event Mesh (AEM) to track changes in sales orders using the "Order Changed" event. After various initial configurations, we have successfully received messages in AEM when a sales order is modified.
Now, on the consumer side a CAP (Node.js) application has been developed, that can listen to the message queue. The CAP application has been set up and is secured with XSUAA.
To enable AEM to connect to the CAP endpoint, we have configured OAuth 2.0 in AEM. Everything is working fine. However, I was wondering if it is possible to configure a BTP Destination in AEM that directly points to the CAP endpoint.
Does AEM support this kind of integration via BTP Destinations? If so, what would be the recommended approach to achieve this? any relevant documentation links would also be helpful
some further details
AEM is in a different subaccount then the consuming CAP applicaiton. I am not sure if this helps, that if I create a destination in BTP pointing to that AEM instance and then bind it to the CAP application, will I already start receiving messages?
Request clarification before answering.
If I understand your setup correctly, you are using the AEM REST Delivery Point feature to have AEM push the events to CAP? This requires indeed quite some configuration in AEM and (imho) creates a quite tight coupling between AEM and your CAP app. And no, there is no destination support inside AEM.
While it is a valid approach and will work great, I tend to approach the connectivity in the opposite direction, from CAP to AEM (or any other messaging option such as the Event Mesh of SAP Integration Suite or the SAP Cloud Application Event Hub).
Have a look at the following sample repository containing an example for both EM and AEM: https://github.com/willempardaens/cap-eventing. You will notice that it is the CAP application taking the initiative to connect/listen to AEM. The credentials to connect to AEM can come from a service binding to avoid hard-coding.
At this point in time CAP does not have native support for AEM, but the team is working on it (see official roadmap item: https://roadmaps.sap.com/board?q=advanced%252520event%252520mesh&range=CURRENT-LAST#;INNO=0D8AD41AB0...), so for now you can use the sample code to explore the overall approach and POC, and switch to the native support once available.
Also have a look at @ajmaradiaga 's recent eBook on the same topic: https://www.sap-press.com/developing-event-driven-integrations-with-sap-btp_6021/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
9 | |
9 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.