title: How to Consume from specific TopicPartitionOffset with Confluent.Kafka in .Net
body: <p>I need my consumer to consume from an specific <code>TopicPartitionOffset(here from offset 278)</code>. Suppose that Messages have been produced by some Producer in Specific topic like <code>="Test_1"</code> before. 
  Here is my Code</p>
  
  <pre><code>using System;
  using Confluent.Kafka;
  
  public class ConsumingTest
  {
      public static void Main(string[] args)
      {
          var consumerConfig = new ConsumerConfig
                                   {
                                       BootstrapServers = "localhost:9092", EnableAutoCommit = false, GroupId = "this-group-id"
                                   };
  
          using (var consumer = new Consumer&lt;Null, string&gt;(consumerConfig))
          {
              Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Consume Started...");
              consumer.Subscribe("Test_1");
  
              var topicPartitionOffset = new TopicPartitionOffset("Test_1", new Partition(0), new Offset(278));
  
              consumer.Assign(topicPartitionOffset);
              consumer.Seek(topicPartitionOffset);
  
              while (true)
                  try
                  {
                      var cr = consumer.Consume();
  
                      Console.WriteLine($"Consumed message '{cr.Value}' at: '{cr.TopicPartitionOffset}'.");
                  }
                  catch (ConsumeException e)
                  {
                      Console.WriteLine(e.Message);
                  }
          }
      }
  }
  </code></pre>
  
  <p>at line ----> <code>var cr = consumer.Consume();</code> Consumer Consumes but nothing Happens. What is the problem.</p>
  
  <p>I have already done <code>AutoOffsetReset = AutoOffsetResetType.Earliest</code> in ConsumerConfig , and Consumer Consumes All messages from all offsets but, this is not what I'm looking for.</p>