@Override
  public void close() throws Exception {
    try {
      if (producer != null) {
        producer.close(Duration.ofSeconds(0));
      }
      transactionalProducer.close(Duration.ofSeconds(0));
    } catch (Exception e) {
      asyncException = ExceptionUtils.firstOrSuppressed(e, asyncException);
    } finally {
      checkErroneous();
    }
  }
Errors encountered in the async producer are stored here.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/write/hidden/kafka/HiddenKafkaProducer.java