protected SourceRecords consumeRecordsByTopic(int numRecords) throws InterruptedException {
  SourceRecords records=new SourceRecords();
  consumeRecords(numRecords,null);
  return records;
}

protected SourceRecords consumeRecordsByTopic ( int numRecords ) throws InterruptedException { SourceRecords records = new SourceRecords ( ) ; consumeRecords ( numRecords , null ) ; return records ; }
try to consume and capture exactly the specified number of records from the connector .
