title: How do I get the the offset of last message of a Kafka topic using confluent-kafka-python?
body: <p>I need to retrive last N messages of a topic using <code>confluent-kafka-python</code>.</p>
  <p>I've been reading <a href="https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#" rel="nofollow noreferrer">https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#</a> for a day, but no finding any appropriate method for getting the offset of the last message, thus I cannot calculate the offset for consumer to start with.</p>
  <p>Please help. Thanks!</p>