public void Handle(CoreProjectionManagementMessage.GetState message) { try { var getStateWorkItem = new GetStateWorkItem( _publisher, message.CorrelationId, message.ProjectionId, this, message.Partition); _processingQueue.EnqueueOutOfOrderTask(getStateWorkItem); ProcessEvent(); } catch (Exception ex) { _publisher.Publish( new CoreProjectionStatusMessage.StateReport( message.CorrelationId, _projectionCorrelationId, message.Partition, state: null, position: null)); _coreProjection.SetFaulted(ex); } }
public void Handle(CoreProjectionManagementMessage.GetState message) { EnsureState( State.Running | State.Paused | State.Stopping | State.Stopped | State.FaultedStopping | State.Faulted); try { if (_state == State.Running || _state == State.Paused) { var getStateWorkItem = new GetStateWorkItem(message.Envelope, message.CorrelationId, this, _partitionStateCache, message.Partition); _processingQueue.EnqueueOutOfOrderTask(getStateWorkItem); } _processingQueue.ProcessEvent(); } catch (Exception ex) { SetFaulted(ex); } }