Exemplo n.º 1
0
        public void TopicBinding()
        {
            var topicExchange = new TopicExchange("t");
            var routingKey    = "r";
            var binding       = BindingBuilder.Bind(queue).To(topicExchange).With(routingKey);

            Assert.NotNull(binding);
            Assert.Equal(topicExchange.ExchangeName, binding.Exchange);
            Assert.Equal(Binding.DestinationType.QUEUE, binding.Type);
            Assert.Equal(queue.QueueName, binding.Destination);
            Assert.Equal(routingKey, binding.RoutingKey);
        }
Exemplo n.º 2
0
 public TopicExchangeRoutingKeyConfigurer To(TopicExchange exchange)
 {
     return(new TopicExchangeRoutingKeyConfigurer(this, exchange));
 }
Exemplo n.º 3
0
 public TopicExchangeRoutingKeyConfigurer(DestinationConfigurer destination, TopicExchange exchange)
     : base(destination, exchange.ExchangeName)
 {
 }