@Override public List<SourceRecord> poll() throws InterruptedException {
  List<SourceRecord> records=new ArrayList<>();
  MqttMessageProcessor message=mQueue.take();
  log.debug("[{}] Polling new data from queue for '{}' topic.",mMqttClientId,mKafkaTopic);
  Collections.addAll(records,message.getRecords(mKafkaTopic));
  return records;
}

@ Override public List < SourceRecord > poll ( ) throws InterruptedException { List < SourceRecord > records = new ArrayList < > ( ) ; MqttMessageProcessor message = mQueue . take ( ) ; log . debug ( "[{}] Polling new data from queue for '{}' topic." , mMqttClientId , mKafkaTopic ) ; Collections . addAll ( records , message . getRecords ( mKafkaTopic ) ) ; return records ; }
poll this sourcetask for new records . this method should block if no data is currently available .
