question: @ Override public CompletableFuture < Void > doUnsubscribe ( Consumer consumer ) { CompletableFuture < Void > future = new CompletableFuture < > ( ) ; try { if ( dispatcher . canUnsubscribe ( consumer ) ) { consumer . close ( ) ; return delete ( ) ; } future . completeExceptionally ( new ServerMetadataException ( "Unconnected or shared consumer attempting to unsubscribe" ) ) ; } catch ( BrokerServiceException e ) { log . warn ( "Error removing consumer {}" , consumer ) ; future . completeExceptionally ( e ) ; } return future ; }
target:  Handle unsubscribe command from the client API Check with the dispatcher is this consumer can proceed with unsubscribe