public void replay(
        ConsumerGroupPartitionMetadataKey key,
        ConsumerGroupPartitionMetadataValue value,
        GroupType groupType
    ) {
        String groupId = key.groupId();
        ModernGroup<?> group = getOrMaybeCreatePersistedGroup(groupId, false, groupType);

        if (value != null) {
            Map<String, TopicMetadata> subscriptionMetadata = new HashMap<>();
            value.topics().forEach(topicMetadata -> {
                subscriptionMetadata.put(topicMetadata.topicName(), TopicMetadata.fromRecord(topicMetadata));
            });
            group.setSubscriptionMetadata(subscriptionMetadata);
        } else {
            group.setSubscriptionMetadata(Collections.emptyMap());
        }
    }
Replays ConsumerGroupPartitionMetadataKey/Value to update the hard state of
the modern group. It updates the subscription metadata of the modern
group.

@param key       A ConsumerGroupPartitionMetadataKey key.
@param value     A ConsumerGroupPartitionMetadataValue record.
@param groupType GroupType (Consumer or Share) for the record.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java