private bool _isValidForRelay(OutboxMessage outboxMessage) { if (outboxMessage == null) { throw new ArgumentNullException("Can not validate null outboxMessage for relay"); } if (outboxMessage.TryCount > this.MaxTries || outboxMessage.IsExpired(DateTime.UtcNow)) { return(false); } return(true); }
private bool _isValidForRetry(OutboxMessage outboxMessage) { if (outboxMessage == null) { throw new ArgumentNullException("Can not validate null outboxMessage for retry"); } //like relay but since the trycount is incremented upon dequeue here we //check if trycount equals max if (outboxMessage.TryCount >= this.MaxTries || outboxMessage.IsExpired(DateTime.UtcNow)) { return(false); } return(true); }