1Topic , 1Partition - Message will be Published to that available partition
1Topic , 2Partition - Message will be published randomly without any pattern
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
2Partition, 1Consumer - Consumer will consume all the messages that come on both the partitions
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
2Partition, 2Consumer - either P0 -> C1 & P1 -> C0 or vice versa