Example #1
0
 private void InnerSubscribeTopic(string topic)
 {
     if (!this.topics.ContainsKey(topic))
     {
         lock (topicsLocker) {
             if (!this.topics.ContainsKey(topic))
             {
                 RabbitMQUtils.DeclareExchange(topic, this.Channel.Value);
                 RabbitMQUtils.BindQueueToExchange(this.queueName, topic, this.Channel.Value);
                 this.topics[topic] = true;
             }
         }
     }
 }
Example #2
0
 public void Publish(string topic, string message)
 {
     RabbitMQUtils.DeclareExchange(topic, channel.Value);
     RabbitMQUtils.Publish(topic, message, this.channel.Value);
 }