修改MQ发送方法,并增加日志

optimize
jianghaiqing 2 years ago
parent 50bb1c8608
commit de92dd9d49

@ -50,6 +50,8 @@ namespace Myshipping.Application
var mqQueueName = $"{queueName}.{tenantId}"; var mqQueueName = $"{queueName}.{tenantId}";
logger.LogInformation("mqQueueName={que}", mqQueueName);
mqModel.QueueDeclare(mqQueueName, false, false, false, null); mqModel.QueueDeclare(mqQueueName, false, false, false, null);
mqModel.QueueBind(mqQueueName, ExchangeName, mqQueueName, null); mqModel.QueueBind(mqQueueName, ExchangeName, mqQueueName, null);
@ -64,7 +66,7 @@ namespace Myshipping.Application
mqModel.BasicPublish(ExchangeName, mqModel.BasicPublish(ExchangeName,
queueName, props, mqQueueName, props,
messageBodyBytes); messageBodyBytes);
logger.LogInformation("MQ报文推送完成"); logger.LogInformation("MQ报文推送完成");

Loading…
Cancel
Save