public void close() {
        try {
            producer.close(Duration.ofSeconds(30));
        } catch (Exception e) {
            log.error("Error encountered while closing the producer", e);
        }
    }
Returns {@link CompletableFuture} which will complete only after publishing of the given {@code remoteLogMetadata}
is considered complete.

@param remoteLogMetadata RemoteLogMetadata to be published
@return
storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/ProducerManager.java