Exemplo n.º 1
0
        public IEnumerable <ResolvedEvent> RemoveClientByCorrelationId(Guid correlationId, bool sendDropNotification)
        {
            PersistentSubscriptionClient client;

            if (!_hash.TryGetValue(correlationId, out client))
            {
                return(new ResolvedEvent[0]);
            }
            _hash.Remove(client.CorrelationId);
            _consumerStrategy.ClientRemoved(client);
            if (sendDropNotification)
            {
                client.SendDropNotification();
            }
            return(client.GetUnconfirmedEvents());
        }