@Override
        public void run() throws Exception {
            for (Iterator<MetadataPublisher> iter = uninitializedPublishers.values().iterator();
                 iter.hasNext(); ) {
                closePublisher(iter.next());
                iter.remove();
            }
            for (Iterator<MetadataPublisher> iter = publishers.values().iterator();
                 iter.hasNext(); ) {
                closePublisher(iter.next());
                iter.remove();
            }
        }
Remove a publisher and close it.

@param publisher         The publisher to remove and close.

@return                  A future which yields null when the publisher has been removed
                         and closed, or an exception if the removal failed.
metadata/src/main/java/org/apache/kafka/image/loader/MetadataLoader.java