Mihail Kostira
Mihail Kostira

Reputation: 520

Cumulocity - where to store the configuration of multi-tenant microservice?

Apparently the best practice for storing microservice config settings is in the tenant options.

But I have a use case where the microservice is multi-tenant and I want a common configuration for all tenants stored in one place.

I got a tip to use the tenant options of the tenant that is the microservice owner (see application owner, https://cumulocity.com/guides/reference/applications/#application). I'm thinking of a solution along these lines - on startup, the microservice looks up the id of its owner tenant and looks for config settings in the tenant options. Is this a viable approach and is it safe to assume that the owner tenant is subscribed to the microservice, so that the service has read privileges?

Upvotes: 1

Views: 268

Answers (1)

TyrManuZ
TyrManuZ

Reputation: 2049

Technically it is not given that the owner tenant is subscribed to the microservice as well. You will just need to ensure that.

If you want to have a common configuration the owner tenant is the best place.

Upvotes: 2

Related Questions