Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }