title: Kinesis consumer recordprocessor factory and record processor threadsafety
body: <p>I have a kinesis consumer application using KCL.
  Kinesis stream has 3 shards and KCL is running on one instance. So there will be three record processor threads running on one instance created using same worker.</p>
  
  <p>These record processors's are created using same recordprocessor factory .  Are these record processor's thread safe ?</p>
  
  <p>Say signature of my recordprocessorfactory constructor is</p>
  
  <pre><code>class MyRecordProcessordFactory implements IRecordProcessorFactory{
  A a;B b;
  MyRecordProcessorFactory(A a , B b)
  this.a=a;this.b=b;
  }
  
  public IRecordProcessor createProcessor(){
  return new MYRecordProcessor(a,b);
  }
  
  }
  
  public class MYRecordProcessor implements IRecordProcessor{
  A a,B b;
  MYRecordProcessor(A a,B b){this.a=a;this.b=b;}
  
  public void processRecords(ProcessRecordInput processRecordInput){
  use a ;
  use b;
  }
  
  }
  </code></pre>
  
  <p>Is use of a and b in processRecords threadsafe ? If not what to do to make it thread safe .
  Just making a and b reference final in MyRecordProcessorFactory and MyRecordProcessor will work ??</p>