This commit is contained in:
Mikhail Trubnikov
2023-09-21 15:37:38 +10:00
parent c7acfd153d
commit 9ff7421d5f

View File

@@ -67,7 +67,7 @@ namespace PARR.BLL.Services.Implementations
channel.BasicPublish(exchange: "", routingKey: mqSettings.QueueName, basicProperties: props, body: body);
sendIdx++;
logger.LogDebug($"Отправлено сообщение в очередь: {mqSettings.QueueName}, {msg}");
logger.LogDebug($"Отправлено сообщение в очередь: {mqSettings.HostName} {mqSettings.QueueName}, {msg}");
}
}
@@ -81,7 +81,7 @@ namespace PARR.BLL.Services.Implementations
for (int i = sendIdx; i < msgList.Length; i++)
notSendMsg.Add(msgList[i]);
logger.LogError(ex, $"Ошибка при отправке сообщения в очередь {mqSettings.QueueName}, {string.Join(',', notSendMsg)}");
logger.LogError(ex, $"Ошибка при отправке сообщения в очередь {mqSettings.HostName} {mqSettings.QueueName}, {string.Join(',', notSendMsg)}");
return new MqSendResult { IsSuccess = false, NotSendMessages = notSendMsg.ToArray() };
}
@@ -104,8 +104,8 @@ namespace PARR.BLL.Services.Implementations
try
{
var connection = facory.CreateConnection();
var channel = connection.CreateModel();
using var connection = facory.CreateConnection();
using var channel = connection.CreateModel();
var args = new Dictionary<string, object> { { "x-queue-mode", "lazy" } };