title: Apache Camel 2.17.3 - Exception unmarshalling CSV stream with bindy
body: <p>I have written a simple route to read CSV file and save it in a new file in JSON format. </p>
  
  <p>When I try to split and stream the body the unmarshal breaks with ".IllegalArgumentException: No records have been defined in the CSV".</p>
  
  <p>However, it works well without split and streaming!</p>
  
  <p>Unmarshal uses a BindyCsvDataFormat and a CustomCsvRecord defines the fields.</p>
  
  <pre><code>CSV Sample:
  HEADER_1;HEADER_2;HEADER_3;HEADER_4;HEADER_5
  data11;data12;data13;data14;data15
  data21;data22;data23;data24;data25
  </code></pre>
  
  <p>Can you help me understand is this the correct behaviour and if so how can I control reading large files?</p>
  
  <p>Please refer below:</p>
  
  <pre><code>public class MyRouteBuilder extends RouteBuilder {
  
      public void configure() {
  
          BindyCsvDataFormat bindy = new BindyCsvDataFormat(com.demo.camel.CustomCsvRecord.class);
          from("file://data?move=../completed/&amp;include=.*.csv&amp;charset=UTF-8")
              .log("Reading file..")
              // .split(body().tokenize("\n")).streaming()
              // .throttle(2)
              // .timePeriodMillis(3000)
              .unmarshal(bindy)
              .marshal().json(true)
              .log("writing to file")
              .to("file://target/messages?fileExist=Append");
          }
      }
  
      @CsvRecord(separator = ";", skipFirstLine = true )
      public class CustomCsvRecord implements Serializable{
  
      private static final long serialVersionUID = -1537445879742479656L;
  
      @DataField(pos = 1)
      private String header_1;
  
      @DataField(pos = 2)
      private String header_2;
  
      @DataField(pos = 3)
      private String header_3;
  
      @DataField(pos = 4)
      private String header_4;
  
      @DataField(pos = 5)
      private String header_5;
          public String getHeader_1() {
          return header_1;
      }
  
      public void setHeader_1(String header_1) {
          this.header_1 = header_1;
      }
  
      public String getHeader_2() {
          return header_2;
      }
  
      public void setHeader_2(String header_2) {
          this.header_2 = header_2;
      }
  
      public String getHeader_3() {
          return header_3;
      }
  
      public void setHeader_3(String header_3) {
          this.header_3 = header_3;
      }
  
      public String getHeader_4() {
          return header_4;
      }
  
      public void setHeader_4(String header_4) {
          this.header_4 = header_4;
      }
  
      public String getHeader_5() {
          return header_5;
      }
  
      public void setHeader_5(String header_5) {
          this.header_5 = header_5;
      }   
  }
  </code></pre>