boolean doesTopicExist(Admin adminClient, String topic) {
        try {
            TopicDescription description = adminClient.describeTopics(Collections.singleton(topic))
                    .topicNameValues()
                    .get(topic)
                    .get();
            if (description != null) {
                log.info("Topic {} exists. TopicId: {}, numPartitions: {}, ", topic,
                        description.topicId(), description.partitions().size());
            } else {
                log.info("Topic {} does not exist.", topic);
            }
            return description != null;
        } catch (ExecutionException | InterruptedException ex) {
            log.info("Topic {} does not exist. Error: {}", topic, ex.getCause().getMessage());
            return false;
        }
    }
Returns {@link CompletableFuture} which will complete only after publishing of the given {@code remoteLogMetadata} into
the remote log metadata topic and the internal consumer is caught up until the produced record's offset.

@param topicIdPartition partition of the given remoteLogMetadata.
@param remoteLogMetadata RemoteLogMetadata to be stored.
@return a future with acknowledge and potentially waiting also for consumer to catch up.
This ensures cache is synchronized with backing topic.
@throws RemoteStorageException if there are any storage errors occur.
storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/TopicBasedRemoteLogMetadataManager.java