private void process(final ShareUnsubscribeEvent event) {
        if (!requestManagers.shareHeartbeatRequestManager.isPresent()) {
            KafkaException error = new KafkaException("Group membership manager not present when processing an unsubscribe event");
            event.future().completeExceptionally(error);
            return;
        }
        ShareMembershipManager membershipManager = requestManagers.shareHeartbeatRequestManager.get().membershipManager();
        CompletableFuture<Void> future = membershipManager.leaveGroup();
        // The future will be completed on heartbeat sent
        future.whenComplete(complete(event.future()));
    }
Process event indicating that the consumer unsubscribed from all topics. This will make
the consumer release its assignment and send a request to leave the share group.

@param event Unsubscribe event containing a future that will complete when the callback
             execution for releasing the assignment completes, and the request to leave
             the group is sent out.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventProcessor.java