79333684

Date: 2025-01-06 16:29:33
Score: 1
Natty:
Report link

I could think of two ways to handle it with Kafka.

  1. Single partition for a topic. You could have only one partition and a consumer that can process messages. Issue would be blocking parallelism processing and bottleneck in performance.
  2. You may have multiple partitions, and producer can insert messages to a specific partition based on a hash outcome. For ex. if you want to make sure a messages for a specific domains are processed in the order, Producer can decide a partition based on a domain value. So all the messages for a particular domain go to same partition, will be processed by the same consumer in order. Possible issue with this approach is uneven data distribution.
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Digant Patel