private void resetGroupMetadata() {
        groupMetadata.updateAndGet(
            oldGroupMetadataOptional -> oldGroupMetadataOptional
                .map(oldGroupMetadata -> initializeConsumerGroupMetadata(
                    oldGroupMetadata.groupId(),
                    oldGroupMetadata.groupInstanceId()
                ))
        );
    }
<p>

This function evaluates the regex that the consumer subscribed to
against the list of topic names from metadata, and updates
the list of topics in subscription state accordingly

@param cluster Cluster from which we get the topics
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java