System contains users entity. Each user can get messages by type.
How to organise this in Kafka? I know, I can create topic Messages and store message by key user-id but what if are million users? Million partitions?
If there are a million users when using user-id as key, it will mean that they will be split among the partitions by hash(user_id) % num_partition
when using the default partitioner, i.e. evenly distributed when your user-ids are not skewed. Choose the number of partitions that suits best for your use case though.