Kafka Consumer not fetching all messages
<p>I am trying to launch dynamic consumer whenever new topic is created in Kafka but dynamically launched consumer is missing starting/first message always but consuming the message from there on. I am using kafka-python module and am using updated KafkaConsumer and KafkaProducer.</p>

<p>Code for Producer is</p>

<pre><code>producer = KafkaProducer(bootstrap_servers='localhost:9092')
record_metadata = producer.send(topic, data)
</code></pre>

<p>and code for consumer is</p>

<pre><code>consumer = KafkaConsumer(topic,group_id="abc",bootstrap_servers='localhost:9092',auto_offset_reset='earliest')
</code></pre>

<p>Please suggest something to over come this problem or any configuration i have to include in my producer and consumer instances.</p>