public void flushSystemProducer() {
    if (systemProducer != null) {
      systemProducer.flush(SOURCE);
    }
  }
force the system producer to flush the messages
samza-log4j/src/main/java/org/apache/samza/logging/log4j/StreamAppender.java