code: private void flushSync() throws Exception {
  		while (producer.getOutstandingRecordsCount() > 0) {
  			producer.flush();
  			try {
  				Thread.sleep(500);
  			} catch (InterruptedException e) {
  				LOG.warn("Flushing was interrupted.");
  				break;
  			}
  		}
  	}
docs: A reimplementation of {@link KinesisProducer#flushSync()}.
  This implementation releases the block on flushing if an interruption occurred.