private QueuePublisher(string exchangeName, string topicName, string queueName, object objectToPublish)
 {
     configurator = QueueConfigurator.CreateQueue(exchangeName, topicName, queueName);
     connection   = configurator.GetConnection();
     model        = connection.CreateModel();
     model.ExchangeDeclare(configurator.ExchangeName, "topic");
     this.objectToPublish = objectToPublish;
 }
Example #2
0
 private QueueConsumer(string exchangeName, string topicName, string queueName)
 {
     configurator = QueueConfigurator.CreateQueue(exchangeName, topicName, queueName);
     Connection   = configurator.GetConnection();
     chanel       = Connection.CreateModel();
     chanel.ExchangeDeclare(configurator.ExchangeName, "topic");
     routingKey = $"{configurator.ExchangeName}.#";
 }