code: public void close() {
      if (consumer != null) {
        try {
          consumer.close();
        } catch (Throwable t) {
          warn(t.getMessage());
        }
      }
  
      conn.close();
    }
docs: Close and release resources.