title: Logstash with persistent queue
body: <p>I have started logstash using following configurations:</p>
  
  <p>Inside <strong><em>logstash.yml</em></strong>:</p>
  
  <pre><code>queue.type: persisted
  queue.max_bytes: 8gb
  queue.checkpoint.writes: 1
  </code></pre>
  
  <p><strong>configuration file:</strong></p>
  
  <pre><code>input {
      beats {
          port =&gt; "5043"
      }
  }
  filter {
      grok {
          match =&gt; {
              "message" =&gt; "%{COMBINEDAPACHELOG}"
          }
      }
      geoip {
          source =&gt; "clientip"
      }
  }
  output {
      elasticsearch {
          hosts =&gt; ["localhost:9200"]
          index =&gt; "test"
          document_type =&gt; "tw"
      }
  }
  </code></pre>
  
  <p>I have such situation.</p>
  
  <ol>
  <li><p>Imagine elasticsearch is turned off</p></li>
  <li><p><strong>Now imagine, while elasticsearch is turned off, logstash received logging events</strong></p></li>
  <li>Now imagine we turn logstash off too</li>
  </ol>
  
  <p>Now, if I turn logstash and elasticsearch on, logstash doesn't send the messages which were received during step 2  -- <strong>that is when elasticsearch was turned off and logstash was receiving events</strong>.</p>