public void NotifyEventsFailed(Guid[] processedEvents, PersistentSubscriptionNakEventAction action, string reason) { Ensure.NotNull(processedEvents, "processedEvents"); Ensure.NotNull(reason, "reason"); var dto = new ClientMessage.PersistentSubscriptionNakEvents( _subscriptionId, processedEvents.Select(x => x.ToByteArray()).ToArray(), reason, (ClientMessage.PersistentSubscriptionNakEvents.NakAction)action); var package = _userCredentials?.AuthToken != null ? new TcpPackage(TcpCommand.PersistentSubscriptionNakEvents, TcpFlags.Authenticated, _correlationId, _userCredentials.AuthToken, dto.Serialize()) : new TcpPackage(TcpCommand.PersistentSubscriptionNakEvents, _userCredentials != null ? TcpFlags.Authenticated : TcpFlags.None, _correlationId, _userCredentials?.Username, _userCredentials?.Password, dto.Serialize()); EnqueueSend(package); }
public Task Nack(PersistentSubscriptionNakEventAction action, string reason, params Uuid[] eventIds) { if (eventIds.Length > 2000) { throw new ArgumentException(); } return(NackInternal(eventIds, action, reason)); }
/// <summary> /// Mark nmessages that have failed processing. The server will take action based upon the action parameter /// </summary> /// <param name="events">The events to mark as failed</param> /// <param name="action">The <see cref="PersistentSubscriptionNakEventAction"></see> action to take</param> /// <param name="reason">A string with a message as to why the failure is occurring</param> public void Fail(IEnumerable <ResolvedEvent> events, PersistentSubscriptionNakEventAction action, string reason) { var ids = events.Select(x => x.OriginalEvent.EventId).ToArray(); if (ids.Length > 2000) { throw new ArgumentOutOfRangeException("events", "events is limited to 2000 to ack at a time"); } _subscription.NotifyEventsFailed(ids, action, reason); }
public void NotifyEventsFailed( Guid[] processedEvents, PersistentSubscriptionNakEventAction action, string reason) { Ensure.NotNull(processedEvents, "processedEvents"); Ensure.NotNull(reason, "reason"); Publisher.PublishWithAuthentication(_authenticationProvider, _userCredentials, ex => DropSubscription(EventStore.Core.Services.SubscriptionDropReason.AccessDenied, ex), user => new ClientMessage.PersistentSubscriptionNackEvents(CorrelationId, CorrelationId, new PublishEnvelope(Publisher, true), _subscriptionId, reason, (ClientMessage.PersistentSubscriptionNackEvents.NakAction)action, processedEvents, user)); }
public Task Nack(PersistentSubscriptionNakEventAction action, string reason, params ResolvedEvent[] resolvedEvents) => Nack(action, reason, Array.ConvertAll(resolvedEvents, resolvedEvent => resolvedEvent.OriginalEvent.EventId));
/// <summary> /// Mark a message failed processing. The server will be take action based upon the action paramter /// </summary> /// <param name="event">The event to mark as failed</param> /// <param name="action">The <see cref="PersistentSubscriptionNakEventAction"></see> action to take</param> /// <param name="reason">A string with a message as to why the failure is occurring</param> public void Fail(ResolvedEvent @event, PersistentSubscriptionNakEventAction action, string reason) { _subscription.NotifyEventsFailed(new [] { @event.OriginalEvent.EventId }, action, reason); }
/// <summary> /// Mark nmessages that have failed processing. The server will take action based upon the action parameter /// </summary> /// <param name="events">The events to mark as failed</param> /// <param name="action">The <see cref="PersistentSubscriptionNakEventAction"></see> action to take</param> /// <param name="reason">A string with a message as to why the failure is occurring</param> public void Fail(IEnumerable<ResolvedEvent> events, PersistentSubscriptionNakEventAction action, string reason) { var ids = events.Select(x => x.OriginalEvent.EventId).ToArray(); if (ids.Length > 2000) throw new ArgumentOutOfRangeException("events", "events is limited to 2000 to ack at a time"); _subscription.NotifyEventsFailed(ids, action, reason); }
/// <summary> /// Mark a message failed processing. The server will be take action based upon the action paramter /// </summary> /// <param name="event">The event to mark as failed</param> /// <param name="action">The <see cref="PersistentSubscriptionNakEventAction"></see> action to take</param> /// <param name="reason">A string with a message as to why the failure is occurring</param> public void Fail(ResolvedEvent @event, PersistentSubscriptionNakEventAction action, string reason) { _subscription.NotifyEventsFailed(new [] {@event.OriginalEvent.EventId}, action, reason); }
public void NotifyEventsFailed(Guid[] processedEvents, PersistentSubscriptionNakEventAction action, string reason) { _subscriptionOperation.NotifyEventsFailed(processedEvents, action, reason); }
public void NotifyEventsFailed(Guid[] processedEvents, PersistentSubscriptionNakEventAction action, string reason) { _subscriptionOperation.NotifyEventsFailed(processedEvents, action, reason); }