Esempio n. 1
0
        public void ProcessTimeoutedItems()
        {
            var timeoutedItems = _queueRepository.GetTimeoutedItems();

            foreach (var timeOutItem in timeoutedItems)
            {
                if (timeOutItem.RetryCount < timeOutItem.MaxRetries)
                {
                    timeOutItem.TimeoutAt = null;
                    timeOutItem.RetryCount++;

                    _queueRepository.RequeueItem(timeOutItem, timeOutItem.RetryCount);
                }
                else
                {
                    _queueRepository.MoveToDeadMessageQueue(timeOutItem); //TODO: Deserialize payload
                }
            }
        }