Exemplo n.º 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;
             }
         }
     }
 }
Exemplo n.º 2
0
 public void Publish(string topic, string message)
 {
     RabbitMQUtils.DeclareExchange(topic, channel.Value);
     RabbitMQUtils.Publish(topic, message, this.channel.Value);
 }