Hi Sar,
Glad to hear you like the article.
Apache Kafka only guarantees event ordering within a single partition. To get ordering you will have to write events for a certain customer (or other entity) to the same partition consistently using event keys.
But neither topics or partitions are meant to be dedicated to one customer. If your system has 10.000 customers, there won’t be 10.000 topics, neither will topics have 10.000 partitions. That’s not how Kafka is designed.
There is one customer topic. With maybe about 20 partitions depending on performance needs. So, there’s about 500 customers per partition. If you need current state for a single customer, you would need to process events for 500 customers just to get the state for that one customer. Not ideal.
There are some other challenges as well. Nice
sources to have a look at for more info:
• https://serialized.io/blog/apache-kafka-is-not-
for-event-sourcing/
• https://www.slideshare.net/gschmutz/kafka-as-an-event-store-is-it-good-enough
If you do want to further explore Apache Kafka, perhaps this is helpful:
• https://www.youtube.com/watch?v=b17l7LvrTco