Пример #1
0
 /// <summary>
 /// 将一个队列绑定到交换机上,也可以说是订阅某个关键词
 /// </summary>
 /// <param name="queueName">队列名字</param>
 /// <param name="exchangeName">交换机名字</param>
 /// <param name="routingKey">路由关键字信息</param>
 /// <param name="arguments">参数</param>
 private void BindQueue(string queueName, string exchangeName, string routingKey, IDictionary <string, object> arguments = null)
 {
     if (StringUtil.AllIsNotNullAndNotWhiteSpace(queueName, exchangeName, routingKey))
     {
         Channel.QueueBind(queueName.Trim(), exchangeName.Trim(), routingKey.Trim(), arguments);
     }
 }