title: Understanding Kafka poll(), flush() & commit()
body: <p>I’m new to Kafka and trying out few small usecase for my new application. The use case is basically, 
  Kafka-producer —> Kafka-Consumer—> flume-Kafka source—>flume-hdfs-sink.</p>
  
  <p>When Consuming(step2), below is the sequence of steps..
  1. consumer.Poll(1.0)
     1.a. Produce to multiple topics (multiple flume agents are listening)
     1.b. Produce. Poll()
  2. Flush() every 25 msgs
  3. Commit() every msgs (asynchCommit=false)</p>
  
  <p>Question 1: Is this sequence of action right!?!</p>
  
  <p>Question2: Will this cause any data loss as the flush is every 25 msgs and commit is for every msg?!?</p>
  
  <p>Question3 :Difference between poll() for producer and poll ()consumer?</p>
  
  <p>Question4 :What happens when messages are committed but not flushed!?!</p>
  
  <p>I will really appreciate if someone can help me understand with offset examples between producer/consumer for poll,flush and commit.</p>
  
  <p>Thanks in advance!!</p>