Skip to content

6. Scenario's

MohanprasadKumar ST edited this page May 17, 2021 · 1 revision

Different Scenario's

Producer

  1. 1Topic , 1Partition - Message will be Published to that available partition
  2. 1Topic , 2Partition - Message will be published randomly without any pattern
  3. 1Topic , 2Partition - If we need to send message to only one partition (say P0), we need to use Producer-msge-single-partition-only.py script which is in code section needs to be used instead of Producer.py

Consumer

  1. 2Partition, 1Consumer - Consumer will consume all the messages that come on both the partitions
  2. 1Partition, 2Consumer
    • If both Consumer on same consumer group , only one consumer will consume messages , other one will sit idle
    • If both Consumer on different consumer group , both consumer will consume messages
  3. 2Partition, 2Consumer - either P0 -> C1 & P1 -> C0 or vice versa