cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sharing Event mesh across subaccounts

laal8293
Explorer
952

Hi

I wonder what a good way of sharing Event Mesh (EM) across subaccounts is. We use Cloud Foundry and have EM in one subaccount I want to send messages to EM from a CAP application running in another subaccount. The way I approached this, was to create a messaging client for my application in EM. In the subaccount where the app is running, I created a user-provided service with the credentials from the messaging client. This approach almost works. The issue I have is that in the VCAP_SERVICES environment variable my user-defined service gets the label "user-provided". This causes the CAP app to not find the credentials since the framework searches for the label “enterprise-messaging”. If I run the app locally and update the label in the default-env file the messaging works.

So basically, I have two questions:

1. Is the user-provided service the correct way to access EM in another subaccount, or is there some other recommended way?

2. Is there a way to set the label value for my user-provided messaging service in VCAP_SERVICES? I’ve tried setting it in the .mta but have so far not been successful.

Thanks

Lars

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Lars, and anyone who might have the same issue.

1. Yes, you can use a user-defined service instance for your binding scenario.

2. Instead of changing the "label value" of your service instance (which should not be possible), you can try to change the way CAP matches its binding entries as described here: Connecting to Required Services | capire (cloud.sap

2024-08-28_12-13-42.PNG

By providing a matching service name or vcap.name in your configurations (package.json), you will also be able to bind a user-defined service instance which is of kind != "enterprise-messaging" and "enterprise-messaging-shared".

sreehari_vpillai
Active Contributor
0 Kudos

Hi . Is there a working example ? I am trying to achieve the same but the user provided service is not recognized by the run time.