C# 消费端如何一直监控RabbitMQ避坑指南

正确方式

  var connection = RabbitMQHelper.Instance.CreateConnection();

  var channel = connection.CreateModel();

错误方式

using (var connection = factory.CreateConnection())
{
    using (var channel = connection.CreateModel())
    {
    }
}

你可能感兴趣的:(rabbitmq,分布式)