Exemple #1
0
        private async Task MoveToEnd(IQueueMessage message, string newMessageVersion)
        {
            newMessageVersion = newMessageVersion ?? message.AsString;
            await _queueReader.AddMessageAsync(newMessageVersion);

            await _queueReader.FinishMessageAsync(message);
        }
        private async Task MoveToPoisonQueue(IQueueMessage message)
        {
            if (_poisonQueueReader == null)
            {
                _poisonQueueReader = _queueReaderFactory.Create(_queueName + PoisonSuffix);
            }
            await _poisonQueueReader.AddMessageAsync(message.AsString);

            await _queueReader.FinishMessageAsync(message);
        }
Exemple #3
0
        private async Task MoveToPoisonQueue(IQueueMessage message, string newMessageVersion)
        {
            newMessageVersion = newMessageVersion ?? message.AsString;
            if (_poisonQueueReader == null)
            {
                _poisonQueueReader = _queueReaderFactory.Create(_connection, _queueName + PoisonSuffix);
            }
            await _poisonQueueReader.AddMessageAsync(newMessageVersion);

            await _queueReader.FinishMessageAsync(message);

            if (_shouldNotify)
            {
                await _notifier.NotifyAsync($"Msg put to {_queueName + PoisonSuffix}, data: {newMessageVersion}");
            }
        }