0

I have to use pubsub yaml file conditionally based on environment. In local I have to use rabbitmq and in other environmenta i have to use other pubsub broker. I have different pubsub yaml files in components folder for different messaging brokers.

For now I am keeping only one and for other one I am commenting. Is there any alternative solution?

1 Answers1

0

Use Dapr Namespaces https://docs.dapr.io/operations/components/component-scopes/

When launched, as long as the Sidecar is configured with a Namespace it will only load components with the same Namespace.

Then you could have: local, dev, prod namespaces, each with different settings. I would suggest naming the files to align with the namespace as well.

Such as:

  • local.pubsub.yml
  • dev.statestore.yml
  • prod.secretstore.yml
General Grievance
  • 4,555
  • 31
  • 31
  • 45