public RabbitMqBusBuilder(RabbitMqHost[] hosts, IConsumePipeSpecification consumePipeSpecification, RabbitMqReceiveSettings busSettings)
            : base(consumePipeSpecification, hosts)
        {
            _hosts = hosts;

            _busEndpointConfigurator = new RabbitMqReceiveEndpointConfigurator(_hosts[0], busSettings, ConsumePipe);
        }
        public IRabbitMqHost Host(RabbitMqHostSettings settings)
        {
            var host = new RabbitMqHost(settings);

            _hosts.Add(host);

            return(host);
        }
        public RabbitMqBusBuilder(RabbitMqHost[] hosts, IConsumePipeFactory consumePipeFactory, ISendPipeFactory sendPipeFactory,
            IPublishPipeFactory publishPipeFactory, RabbitMqReceiveSettings busSettings)
            : base(consumePipeFactory, sendPipeFactory, publishPipeFactory, hosts)
        {
            _hosts = hosts;

            _busEndpointConfigurator = new RabbitMqReceiveEndpointConfigurator(_hosts[0], busSettings, ConsumePipe);
        }
        public IRabbitMqHost Host(RabbitMqHostSettings settings)
        {
            var hostTopology = new RabbitMqHostTopology(new FanoutExchangeTypeSelector(), new RabbitMqMessageNameFormatter(), settings.HostAddress,
                                                        _configuration.Topology);

            var host = new RabbitMqHost(settings, hostTopology);

            _hosts.Add(host);

            return(host);
        }
        public RabbitMqBusBuilder(RabbitMqHost[] hosts, IConsumePipeFactory consumePipeFactory, ISendPipeFactory sendPipeFactory,
            IPublishPipeFactory publishPipeFactory, RabbitMqReceiveSettings busSettings, ModelSettings modelSettings)
            : base(consumePipeFactory, sendPipeFactory, publishPipeFactory, hosts)
        {
            _hosts = hosts;
            _modelSettings = modelSettings;

            _autoDeleteCacheTimeout = TimeSpan.FromMinutes(1);
            _sendEndpointCacheTimeout = TimeSpan.FromDays(1);

            _busEndpointConfigurator = new RabbitMqReceiveEndpointConfigurator(_hosts[0], busSettings, ConsumePipe);
        }
Example #6
0
        public RabbitServer(DealerConfigParser parser, Action<BrokerResponse> processResponse)
        {
            this.processResponse = processResponse;
            rabbitHost = new RabbitMqHost(
                parser.GetString("MQ.Host", "mq1.amarkets.org"),
                parser.GetString("MQ.ResponseQueueName", "mt4_dealer_response"),
                parser.GetString("MQ.User", "deploy"),
                parser.GetString("MQ.Password", "a6e92c1FEA"),
                ProcessRabbitResponse);

            rabbitSender = new RabbitSender(
                AppConfig.GetStringParam("MQ.Host", "mq1.amarkets.org"),
                AppConfig.GetStringParam("MQ.User", "deploy"),
                AppConfig.GetStringParam("MQ.Password", "a6e92c1FEA"),
                AppConfig.GetStringParam("MQ.RequestQueueName", "mt4_dealer_request"));
        }
Example #7
0
        public RabbitServer(DealerConfigParser parser, Action <BrokerResponse> processResponse)
        {
            this.processResponse = processResponse;
            rabbitHost           = new RabbitMqHost(
                parser.GetString("MQ.Host", "mq1.amarkets.org"),
                parser.GetString("MQ.ResponseQueueName", "mt4_dealer_response"),
                parser.GetString("MQ.User", "deploy"),
                parser.GetString("MQ.Password", "a6e92c1FEA"),
                ProcessRabbitResponse);

            rabbitSender = new RabbitSender(
                AppConfig.GetStringParam("MQ.Host", "mq1.amarkets.org"),
                AppConfig.GetStringParam("MQ.User", "deploy"),
                AppConfig.GetStringParam("MQ.Password", "a6e92c1FEA"),
                AppConfig.GetStringParam("MQ.RequestQueueName", "mt4_dealer_request"));
        }
        public IRabbitMqHost Host(RabbitMqHostSettings settings)
        {
            var host = new RabbitMqHost(settings);
            _hosts.Add(host);

            return host;
        }
Example #9
0
 public ConnectionFactoryInfo(ConnectionFactory connectionFactory, RabbitMqHost hostConfiguration)
 {
     ConnectionFactory = connectionFactory;
     HostConfiguration = hostConfiguration;
 }