public static Map<TopicPartition, OffsetAndMetadata> translateOffsets(Map<String, Object> properties,
            String remoteClusterAlias, String consumerGroupId, Duration timeout)
            throws InterruptedException, TimeoutException {
        try (MirrorClient client = new MirrorClient(properties)) {
            return client.remoteConsumerOffsets(consumerGroupId, remoteClusterAlias, timeout);
        }
    }
Translates a remote consumer group's offsets into corresponding local offsets. Topics are automatically
 renamed according to the configured {@link ReplicationPolicy}.
 @param properties Map of properties to instantiate a {@link MirrorClient}
 @param remoteClusterAlias The alias of the remote cluster
 @param consumerGroupId The group ID of remote consumer group
 @param timeout The maximum time to block when consuming from the checkpoints topic
connect/mirror-client/src/main/java/org/apache/kafka/connect/mirror/RemoteClusterUtils.java