title: Logstash is mixing up multiline logs
body: <p>I am inputting logs using Logstash forwarder and using a multiline filter to build the logs into messages (each log is at least 2 lines). The problem is occasionally messages get mixed up.</p>
  
  <p>An example of the file with 3 logs would be</p>
  
  <p>Header1
  Body1</p>
  
  <p>Header2
  Body2</p>
  
  <p>Header3
  Body3</p>
  
  <p>But the logs may show up later as</p>
  
  <p>Header1
  Body2
  Body1</p>
  
  <p>Header2</p>
  
  <p>Header3
  Body3</p>
  
  <p>I am using a stream_identity => "%{host}.%{path}.%{type}.%{file}", but since these two logs are part of the same file, this is not being violated.</p>
  
  <p>This seems to be a problem based on the network traffic, as sometimes it parses all logs perfectly and sometimes it scrambles nearly all of them.</p>
  
  <p>Is there any way I can guarantee that the logs will be built in the correct order?</p>