Suppose we have a Kafka topic with five partitions. A consumer group that has seven instances of consumers is attached to the topic. Is this configuration recommended? If not, why?

No, this configuration is not recommended because it will lead to the wastage of resources. Multiple consumers belonging to the same group cannot read messages/data from the same partitions. Some of the consumers in this instance will not be able to read any messages and will, therefore, be idle. The number of consumers in a group should always be less than or equal to the number of partitions.