...
For example topics in bugfest (ENV == bugfest) the Kafka topic for inventory instances for tenant fs09000000 should have the following name:
Code Block |
---|
bugfest.fs09000000.inventory.instance |
We should also consider cases with many producers and the only consumer, the best example of which is mod-audit - there can be a single topic many modules push their event in, and only the mod-audit consumes events from it to log them for further auditing. We can follow exactly the same convention as stated above, with the only difference - specify not producer module name but consumer module name instead, e.g.
Code Block |
---|
bugfest.fs09000000.mod-audit |
Topic partitioning
In order not to have problems with consistency, that can occur due to race condition in case of concurrent writes to database Kafka topics should have appropriate partition_key. It could be id of the record or some another value, that allow to segregate events between consumer instances.
...