public void complete(TopicIdPartition partition, Acknowledgements acknowledgements) {
            if (acknowledgements != null) {
                result.put(partition, acknowledgements);
            }
            if (remainingResults.decrementAndGet() == 0) {
                ShareAcknowledgementCommitCallbackEvent event = new ShareAcknowledgementCommitCallbackEvent(result);
                backgroundEventHandler.add(event);
                future.ifPresent(future -> future.complete(result));
            }
        }
Handle the result of a ShareAcknowledge request sent to one or more nodes and
signal the completion when all results are known.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java