Skip to Content
0
Oct 10, 2022 at 05:25 PM

CAP Node JS - messaging

434 Views

Should messaging subscription on wildcards work?

The following seems to do the subscription in event mesh correctly, but when I try this ....

 messaging.on('ce/sap/*', async (msg) => {
        console.log('Received message from sap', msg)
    })

... I receive the following error

enterprise-messaging-amqp] - ERROR occured in asynchronous event processing: Error: No handler for incoming message with topic 'riz/inno/events/ce/sap/s4/beh/functionallocation/v1/FunctionalLocation/Created/v1' found.

My package json configuration is:

        "messaging": {
          "kind": "enterprise-messaging-shared",
          "format": "cloudevents",
          "publishPrefix": "$namespace/",
          "subscribePrefix": "$namespace/"
        }

Our event mesh is configured with the following namespace: riz/inno/events

I am referring to URL:

https://cap.cloud.sap/docs/node.js/messaging