I have created a topic in Kafka with partition count 3 now in all these three partitions I want to push unique messages. Is there any way to do it?
I checked producer.send
pushes duplicate messages on all partitions.
For testing I am using following code:
from kafka import KafkaProducer
from kafka.errors import KafkaError
producer = KafkaProducer(bootstrap_servers=['localhost:9092'])
# Asynchronous by default
future = producer.send('my-topic', b'raw_bytes')
But it is sending duplicate messages on partitions.