public ConnectionContextFactory(ActiveMqHostSettings settings, IActiveMqHostTopology topology)
        {
            _settings = settings;
            _topology = topology;

            _description = settings.ToString();
        }
Exemple #2
0
        public ActiveMqHost(IActiveMqHostConfiguration hostConfiguration, IActiveMqHostTopology hostTopology)
            : base(hostConfiguration, hostTopology)
        {
            _hostConfiguration = hostConfiguration;
            Topology           = hostTopology;

            Add(hostConfiguration.ConnectionContextSupervisor);
        }
        public ConnectionContextFactory(ActiveMqHostSettings settings, IActiveMqHostTopology topology)
        {
            _settings = settings;
            _topology = topology;

            _description = settings.ToString();

            _connectionFactory = new Lazy <IConnectionFactory>(settings.CreateConnectionFactory);
        }
        public ActiveMqHostConfiguration(IActiveMqBusConfiguration busConfiguration, IActiveMqTopologyConfiguration topologyConfiguration)
            : base(busConfiguration)
        {
            _busConfiguration = busConfiguration;

            _hostSettings = new ConfigurationHostSettings(new Uri("activemq://localhost"));
            _hostTopology = new ActiveMqHostTopology(this, topologyConfiguration);

            _connectionContext = new Recycle <IConnectionContextSupervisor>(() => new ConnectionContextSupervisor(this, topologyConfiguration));
        }
        public ActiveMqHostConfiguration(IActiveMqBusConfiguration busConfiguration, ActiveMqHostSettings hostSettings, IActiveMqHostTopology hostTopology)
        {
            _busConfiguration = busConfiguration;
            _hostSettings     = hostSettings;
            _hostTopology     = hostTopology;

            _host = new ActiveMqHost(this);

            Description = hostSettings.ToDescription();
        }
Exemple #6
0
        public ConnectionContextFactory(IActiveMqHostConfiguration configuration, IActiveMqHostTopology hostTopology)
        {
            _configuration = configuration;
            _hostTopology  = hostTopology;

            _connectionRetryPolicy = Retry.CreatePolicy(x =>
            {
                x.Handle <ActiveMqTransportException>();

                x.Exponential(1000, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(3));
            });
        }
Exemple #7
0
        public ActiveMqConnectionContext(IConnection connection, ActiveMqHostSettings hostSettings, IActiveMqHostTopology topology, string description,
                                         CancellationToken cancellationToken)
            : base(new PayloadCache(), cancellationToken)
        {
            _connection  = connection;
            HostSettings = hostSettings;
            Topology     = topology;

            Description = description;

            _taskScheduler = new LimitedConcurrencyLevelTaskScheduler(1);
        }
Exemple #8
0
        public ActiveMqConnectionContext(IConnection connection, IActiveMqHostConfiguration configuration, IActiveMqHostTopology hostTopology,
                                         CancellationToken cancellationToken)
            : base(cancellationToken)
        {
            _connection = connection;

            Description = configuration.Description;
            HostAddress = configuration.HostAddress;

            Topology = hostTopology;

            _taskScheduler = new LimitedConcurrencyLevelTaskScheduler(1);
        }
Exemple #9
0
        public ActiveMqHost(IActiveMqHostConfiguration hostConfiguration, IActiveMqHostTopology hostTopology)
            : base(hostConfiguration, hostTopology)
        {
            _hostConfiguration = hostConfiguration;
            _hostTopology      = hostTopology;

            ConnectionRetryPolicy = Retry.CreatePolicy(x =>
            {
                x.Handle <ActiveMqTransportException>();

                x.Exponential(1000, TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(3));
            });

            ConnectionContextSupervisor = new ActiveMqConnectionContextSupervisor(hostConfiguration, hostTopology);
        }
        public ActiveMqHostConfiguration(IActiveMqBusConfiguration busConfiguration, IActiveMqTopologyConfiguration topologyConfiguration)
            : base(busConfiguration)
        {
            _busConfiguration = busConfiguration;

            _hostSettings = new ConfigurationHostSettings(new Uri("activemq://localhost"));
            _hostTopology = new ActiveMqHostTopology(this, topologyConfiguration);

            ReceiveTransportRetryPolicy = Retry.CreatePolicy(x =>
            {
                x.Handle <ConnectionException>();

                x.Exponential(1000, TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(3));
            });

            _connectionContext = new Recycle <IConnectionContextSupervisor>(() => new ConnectionContextSupervisor(this, topologyConfiguration));
        }
Exemple #11
0
        public ActiveMqHost(IActiveMqBusConfiguration busConfiguration, ActiveMqHostSettings settings, IActiveMqHostTopology topology)
        {
            _settings = settings;
            _topology = topology;

            ReceiveEndpoints = new ReceiveEndpointCollection();

            ConnectionRetryPolicy = Retry.CreatePolicy(x =>
            {
                x.Handle <ActiveMqTransportException>();

                x.Exponential(1000, TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(3));
            });

            ConnectionCache = new ActiveMqConnectionCache(settings, _topology);

            ReceiveEndpointFactory = new ActiveMqReceiveEndpointFactory(busConfiguration, this);
        }
Exemple #12
0
 public ActiveMqHost(IActiveMqHostConfiguration hostConfiguration, IActiveMqHostTopology hostTopology)
     : base(hostConfiguration, hostTopology)
 {
     _hostConfiguration = hostConfiguration;
     Topology           = hostTopology;
 }
Exemple #13
0
 public ActiveMqConnectionContextSupervisor(IActiveMqHostConfiguration configuration, IActiveMqHostTopology hostTopology)
     : base(new ConnectionContextFactory(configuration, hostTopology))
 {
     _description = configuration.Description;
 }
 public ConnectionContextFactory(IActiveMqHostConfiguration configuration, IActiveMqHostTopology hostTopology)
 {
     _configuration = configuration;
     _hostTopology  = hostTopology;
 }
Exemple #15
0
 public ActiveMqConnectionCache(ActiveMqHostSettings settings, IActiveMqHostTopology topology)
     : base(new ConnectionContextFactory(settings, topology))
 {
     _description = settings.ToString();
 }
 public DelayedExchangeScheduleMessageProvider(ISendEndpointProvider sendEndpointProvider, IActiveMqHostTopology topology, Uri hostAddress)
 {
     _sendEndpointProvider = sendEndpointProvider;
     _topology             = topology;
     _hostAddress          = hostAddress;
 }