title: When Kafka Consumer subscribe the event, it show Timed out 1 in-flight
body: <p>This script is the method to subscribe event from Kafka.</p>
  
  <pre><code>using Confluent.Kafka;
  using Confluent.Kafka.Serialization;
  static void Main(string[] args)
  {
      string brokerList = "broker";
      var topics = new List&lt;string&gt;() { "topicName" };
      var config = new Dictionary&lt;string, object&gt;
      {
          { "group.id", "ConsumerGroup" },
          { "bootstrap.servers", brokerList },
          { "auto.offset.reset", "earliest" },
          { "enable.auto.commit", false }
      };
  
      using (var consumer = new Consumer&lt;string, string&gt;(config, new StringDeserializer(Encoding.UTF8), new StringDeserializer(Encoding.UTF8)))
      {
          consumer.OnMessage += (obj, msg) =&gt;
          {
              ...
          };
  
          consumer.Subscribe(topics);
  
          while (true)
          {
              consumer.Poll(TimeSpan.FromMilliseconds(1000));
          }
      }
  }
  </code></pre>
  
  <p>When I trace the code in Debug mode, the order of subscribing event is:</p>
  
  <ol>
  <li><code>consumer.Subscribe(topics)</code></li>
  <li><code>consumer.Poll(TimeSpan.FromMilliseconds(1000));</code></li>
  <li><code>consumer.OnMessage += (obj, msg) =&gt;</code></li>
  </ol>
  
  <p>Before getting the new event (go to <code>consumer.OnMessage</code>), it spent a little time to poll (in <code>consumer.Poll</code>) and print some information on console window.</p>
  
  <p>As follow:</p>
  
  <pre><code>4|2018-12-12 10:41:53.381|rdkafka#consumer-1|REQTMOUT| [thrd:broker/bootstrap]: broker/bootstrap: Timed out 1 in-flight, 0 retry-queued, 0 out-queue, 0 partially-sent requests
  </code></pre>
  
  <p>In my original thoughts, it use <code>consumer.Subscribe(topics)</code> to connect broker and use <code>consumer.Poll</code> to consume the new event.</p>
  
  <p>But it seems that the <code>consumer.Poll</code> includes connecting to broker and consuming the new event.</p>
  
  <h2>My questions are:</h2>
  
  <ol>
  <li>Which function can connect to broker?  <code>consumer.Subscribe</code> or
  <code>consumer.Poll</code> or?</li>
  <li>Why <code>consumer.Poll</code> print the information on console window? And it seems that having some error (<strong>Timed out 1 in-flight</strong>).</li>
  </ol>