public OutstandingMessage(Guid eventId, PersistentSubscriptionClient handlingClient, ResolvedEvent resolvedEvent, int retryCount) : this()
 {
     EventId = eventId;
     HandlingClient = handlingClient;
     ResolvedEvent = resolvedEvent;
     RetryCount = retryCount;
 }
 public OutstandingMessage(Guid eventId, PersistentSubscriptionClient handlingClient, ResolvedEvent resolvedEvent, int retryCount) : this()
 {
     EventId        = eventId;
     HandlingClient = handlingClient;
     ResolvedEvent  = resolvedEvent;
     RetryCount     = retryCount;
 }
Example #3
0
 public void AddMessageAsProcessing(ResolvedEvent ev, PersistentSubscriptionClient client)
 {
     lock (_lock)
     {
         _outstandingMessages.StartMessage(new OutstandingMessage(ev.OriginalEvent.EventId, client, ev, 0),
                                           DateTime.Now + _settings.MessageTimeout);
     }
 }
 public void AddMessageAsProcessing(ResolvedEvent ev, PersistentSubscriptionClient client)
 {
     lock (_lock)
     {
         StartMessage(new OutstandingMessage(ev.OriginalEvent.EventId, client, ev, 0),
                      _settings.MessageTimeout == TimeSpan.MaxValue ? DateTime.MaxValue : DateTime.UtcNow + _settings.MessageTimeout);
     }
 }
 public OutstandingMessage(Guid eventId, PersistentSubscriptionClient handlingClient,
                           ResolvedEvent resolvedEvent, int retryCount) : this()
 {
     EventId         = eventId;
     HandlingClient  = handlingClient;
     ResolvedEvent   = resolvedEvent;
     RetryCount      = retryCount;
     IsReplayedEvent = resolvedEvent.OriginalStreamId.StartsWith("$persistentsubscription-") && resolvedEvent.OriginalStreamId.EndsWith("-parked");
 }
Example #6
0
 public void AddClient(Guid correlationId, Guid connectionId, IEnvelope envelope, int maxInFlight, string user, string @from)
 {
     lock (_lock)
     {
         var client = new PersistentSubscriptionClient(correlationId, connectionId, envelope, maxInFlight, user,
                                                       @from, _totalTimeWatch, _settings.ExtraStatistics);
         _pushClients.AddClient(client);
         TryPushingMessagesToClients();
     }
 }
 public void ClientRemoved(PersistentSubscriptionClient client)
 {
     if (!Clients.Contains(client))
     {
         throw new InvalidOperationException("Only added clients can be removed.");
     }
     var temp = Clients.ToList();
     var indexOf = temp.IndexOf(client);
     temp.RemoveAt(indexOf);
     Clients.Clear();
     foreach (var persistentSubscriptionClient in temp)
     {
         Clients.Enqueue(persistentSubscriptionClient);
     }
 }
        public void ClientRemoved(PersistentSubscriptionClient client)
        {
            if (!Clients.Contains(client))
            {
                throw new InvalidOperationException("Only added clients can be removed.");
            }
            var temp    = Clients.ToList();
            var indexOf = temp.IndexOf(client);

            temp.RemoveAt(indexOf);
            Clients.Clear();
            foreach (var persistentSubscriptionClient in temp)
            {
                Clients.Enqueue(persistentSubscriptionClient);
            }
        }
 public void AddMessageAsProcessing(ResolvedEvent ev, PersistentSubscriptionClient client)
 {
     lock (_lock)
     {
         _outstandingMessages.StartMessage(new OutstandingMessage(ev.OriginalEvent.EventId, client, ev, 0),
             DateTime.Now + _settings.MessageTimeout);
     }
 }
 public void AddClient(Guid correlationId, Guid connectionId, IEnvelope envelope, int maxInFlight, string user, string @from)
 {
     lock (_lock)
     {
         var client = new PersistentSubscriptionClient(correlationId, connectionId, envelope, maxInFlight, user,
             @from, _totalTimeWatch, _settings.ExtraStatistics);
         _pushClients.AddClient(client);
         TryPushingMessagesToClients();
     }
 }
Example #11
0
 public void AddClient(PersistentSubscriptionClient client)
 {
     _hash.Add(client.CorrelationId, client);
     _consumerStrategy.ClientAdded(client);
 }
 public void AddClient(PersistentSubscriptionClient client)
 {
     _hash.Add(client.CorrelationId, client);
     _consumerStrategy.ClientAdded(client);
 }
 public void ClientAdded(PersistentSubscriptionClient client)
 {
     Clients.Enqueue(client);
 }
 public void ClientAdded(PersistentSubscriptionClient client)
 {
     Clients.Enqueue(client);
 }