on 11-27-2023 11:27 AM
Hi,
I want to emit and receive events from SAP Event Mesh in my CAP app. We have a dedicated queue for the topic where the events will be emitted to from the CAP app and a dedicated queue for the topic where I'll need to receive the events from.
My service definition:
service Service {
// Events @topic: 'a/b/c/triggered'
event triggered : { ID : UUID; parameters : { a : String(2); b: array of String(4); c : array of String(7) } } }
My service logic:
const messaging_receiving = await cds.connect.to("messaging-receiving");
const messaging_publishing = await cds.connect.to("messaging-publishing");
this.after("CREATE", "Runs", async (each) => {
const sA = "";
const aB = [];
const aC = [];
const oPayLoad = { ID: sInterfaceRunID, parameters: { a: sA, b: aB, c: aC, }, };
await messaging_publishing.emit( "a/b/c/triggered", oPayLoad ); } });
My cds.requires:
"cds": {
"requires" : {
"messaging-receiving": {
"kind": "enterprise-messaging-shared",
"publishPrefix": "$namespace/",
"subscribePrefix": "$namespace/",
"format": "cloudevents",
"queue": {
"name": "$namespace/v1/flowStatus"
}
},
"messaging-publishing": {
"kind": "enterprise-messaging-shared",
"publishPrefix": "$namespace/",
"subscribePrefix": "$namespace/",
"format": "cloudevents",
"queue": {
"name": "$namespace/v1/startFlow"
}
}
}
}<br>
The automatic creation of queues and topics is visible in the SAP Event Mesh. I'm able to receive events, but the ones I emit aren't showing up in the SAP Event Mesh. Any idea what I might be missing?
Kind regards,
Julian
We've fixed this issue by updaring @sap/cds from version 7.3.1. to version 7.4.1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.