code: public void close() {
          logger.info("Closing all sync producers");
          if (sync) {
              for (SyncProducer p : syncProducers.values()) {
                  p.close();
              }
          } else {
              for (AsyncProducer<V> p : asyncProducers.values()) {
                  p.close();
              }
          }
  
      }
docs: Closes all the producers in the pool