@Override
    public void consumerRebalanceListenerCallbackCompleted(ConsumerRebalanceListenerCallbackCompletedEvent event) {
        ConsumerRebalanceListenerMethodName methodName = event.methodName();
        Optional<KafkaException> error = event.error();
        CompletableFuture<Void> future = event.future();

        if (error.isPresent()) {
            Exception e = error.get();
            log.warn(
                "The {} method completed with an error ({}); signaling to continue to the next phase of rebalance",
                methodName.fullyQualifiedMethodName(),
                e.getMessage()
            );

            future.completeExceptionally(e);
        } else {
            log.debug(
                "The {} method completed successfully; signaling to continue to the next phase of rebalance",
                methodName.fullyQualifiedMethodName()
            );

            future.complete(null);
        }
    }
Enqueue a {@link ConsumerRebalanceListenerCallbackNeededEvent} to trigger the execution of the
appropriate {@link ConsumerRebalanceListener} {@link ConsumerRebalanceListenerMethodName method} on the
application thread.

<p/>

Because the reconciliation process (run in the background thread) will be blocked by the application thread
until it completes this, we need to provide a {@link CompletableFuture} by which to remember where we left off.

@param methodName Callback method that needs to be executed on the application thread
@param partitions Partitions to supply to the callback method
@return Future that will be chained within the rest of the reconciliation logic
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java