title: How to get message from a kafka topic with a specific offset
body: <p>We have an HDP cluster with 3 kafka brokers ( from hortonworks ) </p>
  
  <p>We want to run kafka console consumer in order to get one message from topic with specific offset</p>
  
  <pre><code>/usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh --zookeeper zoo01:2181  --topic lopet.lo.pm--partition 0 --offset 34537263 --max-messages 1
  </code></pre>
  
  <p>But we get the following:</p>
  
  <p>Where we are wrong?</p>
  
  <pre><code>Using the ConsoleConsumer with old consumer is deprecated and will be removed in a future major release. Consider using the new consumer by passing [bootstrap-server] instead of [zookeeper].
  Partition-offset based consumption is supported in the new consumer only.
  Option                                   Description
  ------                                   -----------
  --blacklist &lt;blacklist&gt;                  Blacklist of topics to exclude from
                                             consumption.
  --bootstrap-server &lt;server to connect    REQUIRED (unless old consumer is
    to&gt;                                      used): The server to connect to.
  --consumer-property &lt;consumer_prop&gt;      A mechanism to pass user-defined
                                             properties in the form key=value to
                                             the consumer.
  --consumer.config &lt;config file&gt;          Consumer config properties file. Note
                                             that [consumer-property] takes
                                             precedence over this config.
  --csv-reporter-enabled                   If set, the CSV metrics reporter will
                                             be enabled
  --delete-consumer-offsets                If specified, the consumer path in
                                             zookeeper is deleted when starting up
  --enable-systest-events                  Log lifecycle events of the consumer
                                             in addition to logging consumed
                                             messages. (This is specific for
                                             system tests.)
  --formatter &lt;class&gt;                      The name of a class to use for
                                             formatting kafka messages for
                                             display. (default: kafka.tools.
                                             DefaultMessageFormatter)
  --from-beginning                         If the consumer does not already have
                                             an established offset to consume
                                             from, start with the earliest
                                             message present in the log rather
                                             than the latest message.
  --key-deserializer &lt;deserializer for
    key&gt;
  --max-messages &lt;Integer: num_messages&gt;   The maximum number of messages to
                                             consume before exiting. If not set,
                                             consumption is continual.
  --metrics-dir &lt;metrics directory&gt;        If csv-reporter-enable is set, and
                                             this parameter isset, the csv
                                             metrics will be outputed here
  --new-consumer                           Use the new consumer implementation.
                                             This is the default.
  --offset &lt;consume offset&gt;                The offset id to consume from (a non-
                                             negative number), or 'earliest'
                                             which means from beginning, or
                                             'latest' which means from end
                                             (default: latest)
  </code></pre>