Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ENV and tenant id setting should be used in topic naming convention. This will separate data of different customers to different Kafka topics. In addition to that it allows a Kafka instance to be shared by multiple environments that have the same tenant id. 

Approach

Topic name should be concatenated from the following string constants (in exactly the same order):

  1. Environment name (from ENV environment variable)
  2. Tenant name (should be the second, because it is convenient to use wildcard in ACL for Kafka users)
  3. Producer module name ("storage" postfix should be omitted)
  4. Domain entity name in singular form (if it is not domain event, the name of process should be used )Tenant name (should be at the end, because it is convenient to use wildcard subscription in such caseor just event name)

For example topics in bugfest (ENV  == bugfest) the Kafka topic for inventory instances for tenant fs09000000 should have the following name:

bugfest.fs09000000.inventory.instance.fs09000000