on 2023 Feb 21 8:26 AM
I have a problem when using SAP EventMesh with CAP. Sometime in the days, we saw that the app stop to process the event. The Queue number just keep increase, but none has been take. The only way is to restart the CAP service. We found that the Webhook said Handshake Failed. We tried to trace back the log of the CAP, but none errors log so far.
My question is, what can cause the Handshake Failed for the Event Mesh Webhook, and how to prevent it? We can't manually restart the CAP service all the time.
The CAP project is using @sap/cds version 6.4.0 (NodeJS 16)
Request clarification before answering.
Hi andrew.mai.laidon,
when configuring the webhook on EM side, did you set the "Exempt Handshake" option to true? If not, you need to implement the handshake mechanism in your CAP app: https://help.sap.com/docs/SAP_EM/bf82e6b26456494cbdd197057c09979f/387a7e03feb24f6bb154ab1170e45eee.h...
Another option: can't your CAP app subsrcibe to Event Mesh for event consumption? So you don't have to push the messages to your app, but your app subscribes to the interesting events: https://cap.cloud.sap/docs/guides/messaging/#using-sap-event-mesh
Best regards,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi tobias.griebe ,
For the EventMesh config, I just use the standard config:
"[production]": {"kind": "enterprise-messaging", "publishPrefix": "$namespace/", "subscribePrefix": "$namespace/", "format": "cloudevents", "queue": { "name": "$namespace/RequestorProcess" } }
But the handshake issues is happen randomly, and when I restart the CAP Service, it will run fine again. So is there any specific code in the @sap/cds lib that handle the handshake for the Webhook so I can take a look?
Per default, exemptHandshake is set to false, but you can overwrite this in your webhook configuration https://cap.cloud.sap/docs/node.js/messaging#sap-event-mesh-1
The link from the document: https://help.sap.com/doc/3dfdf81b17b744ea921ce7ad464d1bd7/Cloud/en-US/messagingrest-api-spec.html. But should I modify these additional properties? I still get this error randomly, quite frustrating for an enterprise service. But I have notice that it only happend when my site I have a high traffic.
User | Count |
---|---|
62 | |
8 | |
7 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.