public async Task Should_be_able_to_handle() { await Bus.Publish <Ping>(new { }); var context = await _handled; var entityName = new AmazonSqsMessageNameFormatter().GetMessageName(typeof(Ping)); Assert.That(context.DestinationAddress, Is.EqualTo(new Uri($"amazonsqs://localhost/test/{entityName}"))); }
public AmazonSqsHostConfiguration(IAmazonSqsBusConfiguration busConfiguration, IAmazonSqsTopologyConfiguration topologyConfiguration) : base(busConfiguration) { _busConfiguration = busConfiguration; _topologyConfiguration = topologyConfiguration; _hostSettings = new ConfigurationHostSettings(); var messageNameFormatter = new AmazonSqsMessageNameFormatter(); _hostTopology = new AmazonSqsHostTopology(this, messageNameFormatter, topologyConfiguration); _connectionContext = new Recycle <IConnectionContextSupervisor>(() => new ConnectionContextSupervisor(this, topologyConfiguration)); }
public AmazonSqsHostConfiguration(IAmazonSqsBusConfiguration busConfiguration, IAmazonSqsTopologyConfiguration topologyConfiguration) : base(busConfiguration) { _busConfiguration = busConfiguration; _topologyConfiguration = topologyConfiguration; _hostSettings = new ConfigurationHostSettings(); var messageNameFormatter = new AmazonSqsMessageNameFormatter(); _hostTopology = new AmazonSqsHostTopology(this, messageNameFormatter, topologyConfiguration); ReceiveTransportRetryPolicy = Retry.CreatePolicy(x => { x.Handle <AmazonSqsTransportException>(); x.Exponential(1000, TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(3)); }); _connectionContext = new Recycle <IConnectionContextSupervisor>(() => new ConnectionContextSupervisor(this, topologyConfiguration)); }