private void replaceTargetAssignmentWithNewAssignment(
            ConsumerGroupHeartbeatResponseData.Assignment assignment) {
        currentTargetAssignment.updateWith(assignment).ifPresent(updatedAssignment -> {
            log.debug("Target assignment updated from {} to {}. Member will reconcile it on the next poll.",
                currentTargetAssignment, updatedAssignment);
            currentTargetAssignment = updatedAssignment;
        });
    }
Overwrite the target assignment with the new target assignment.

@param assignment Target assignment received from the broker.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java