title: How to get consumer offset value of kafka
body: <p>I have <code>producer</code> which is sending messages to a topic continuously.</p>
  
  <p>Suppose my <code>consumer</code> consumed 1 to 10 messages, before consuming the 11th message it was crashed , when it get back <code>producer</code> produced 100 messages let say now messages are  110, I know that When a <code>consumer</code> joins a <code>consumer group</code> it will fetch the last committed offset so it will restart to read from 11 but I want to print these offset values in log using <code>java</code> and making sure that it wont miss a message</p>
  
  <p>Also how can we get the topic wise TTL in <code>kafka</code></p>