예제 #1
0
 public void Handle(EventReaderSubscriptionMessage.PartitionDeleted message)
 {
     //TODO:  make sure this is no longer required : if (_state != State.StateLoaded)
     if (IsOutOfOrderSubscriptionMessage(message))
     {
         return;
     }
     RegisterSubscriptionMessage(message);
     try
     {
         if (_statePartitionSelector.EventReaderBasePartitionDeletedIsSupported())
         {
             var partitionDeletedWorkItem = new PartitionDeletedWorkItem(this, message);
             _processingQueue.EnqueueOutOfOrderTask(partitionDeletedWorkItem);
             if (_state == PhaseState.Running) // prevent processing mostly one projection
             {
                 EnsureTickPending();
             }
         }
     }
     catch (Exception ex)
     {
         _coreProjection.SetFaulted(ex);
     }
 }
예제 #2
0
 public PartitionDeletedWorkItem(
     IEventProcessingProjectionPhase projection, EventReaderSubscriptionMessage.PartitionDeleted message)
     : base(null)
 {
     _partition       = message.Partition;
     _projection      = projection;
     _message         = message;
     _requiresRunning = true;
 }