I run Kafka with Docker,
First I created a topic like this,
docker exec -t kafka kafka-topics --bootstrap-server :9092 --create --topic kafka-test --partitions 5 --replication-factor 1
As you see, there are 5 partitions, I used the code below
I think this code probably produces messages but for only Partition 3,
it works but divides data for all partitions so not only for partition 3... and some of them are below like P2 and P0 (Partition2 - Partition0)
BUT I just want to produce messages for only specific partition...
Do I miss something ? or Do I get something wrong?
Consumer Codes below
This the picture of Consumer..