/// <summary> /// Removes client from the queue /// </summary> public async Task <bool> RemoveClient(MqClient client) { QueueClient cc = _clients.FindAndRemove(x => x.Client == client); if (cc == null) { return(false); } client.RemoveSubscription(cc); foreach (IQueueEventHandler handler in Server.QueueEventHandlers) { await handler.OnConsumerUnsubscribed(cc); } OnConsumerUnsubscribed.Trigger(cc); return(true); }