예제 #1
0
 public ResponderConfigurationBuilder(QueueConfiguration defaultQueue = null, ExchangeConfiguration defaultExchange = null)
 {
     _exchangeBuilder = new ExchangeConfigurationBuilder(defaultExchange);
     _queueBuilder    = new QueueConfigurationBuilder(defaultQueue);
     Configuration    = new ResponderConfiguration
     {
         Queue      = _queueBuilder.Configuration,
         Exchange   = _exchangeBuilder.Configuration,
         RoutingKey = _queueBuilder.Configuration.QueueName
     };
 }
예제 #2
0
        public ITopologySelector UseConfiguration(Action <IExchangeConfigurationBuilder> cfgAction, Func <string, string> bindingKeyTransformer = null)
        {
            var builder = new ExchangeConfigurationBuilder(new ExchangeUpdateConfiguration(_config.Exchange));

            cfgAction(builder);
            var cfg = builder.Configuration as ExchangeUpdateConfiguration;

            cfg.ExchangeName = _current.ExchangeName;
            if (bindingKeyTransformer != null)
            {
                cfg.BindingTransformer = bindingKeyTransformer;
            }
            Exchanges.Add(cfg);
            return(this);
        }
 public RequestConfigurationBuilder(RequestConfiguration defaultConfig)
 {
     _replyQueue   = new QueueConfigurationBuilder(defaultConfig.ReplyQueue);
     _exchange     = new ExchangeConfigurationBuilder(defaultConfig.Exchange);
     Configuration = defaultConfig ?? new RequestConfiguration();
 }
예제 #4
0
 public PublishConfigurationBuilder(RequestConfiguration defaultConfig)
 {
     _exchange = new ExchangeConfigurationBuilder(defaultConfig.Exchange);
 }
예제 #5
0
 public PublishConfigurationBuilder(ExchangeConfiguration defaultExchange = null, string routingKey = null)
 {
     _exchange   = new ExchangeConfigurationBuilder(defaultExchange);
     _routingKey = routingKey ?? _oneOrMoreWords;
 }
예제 #6
0
 public SubscriptionConfigurationBuilder(QueueConfiguration initialQueue, ExchangeConfiguration initialExchange, string routingKey)
 {
     _exchangeBuilder = new ExchangeConfigurationBuilder(initialExchange);
     _queueBuilder    = new QueueConfigurationBuilder(initialQueue);
     _routingKey      = routingKey;
 }