示例#1
0
        public AmazonSqsHost(IAmazonSqsHostConfiguration hostConfiguration, IAmazonSqsHostTopology hostTopology)
            : base(hostConfiguration, hostTopology)
        {
            _hostConfiguration    = hostConfiguration;
            _hostTopology         = hostTopology;
            ConnectionRetryPolicy = Retry.CreatePolicy(x =>
            {
                x.Handle <AmazonSqsTransportException>();

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

            ConnectionContextSupervisor = new AmazonSqsConnectionContextSupervisor(hostConfiguration, hostTopology);
        }
示例#2
0
        public AmazonSqsHost(IAmazonSqsHostConfiguration hostConfiguration)
        {
            _hostConfiguration = hostConfiguration;

            _receiveEndpoints = new ReceiveEndpointCollection();
            Add(_receiveEndpoints);

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

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

            ConnectionContextSupervisor = new AmazonSqsConnectionContextSupervisor(hostConfiguration);
        }