public AmazonInternalSettings() { ResolutionContext = null; AmazonPeekLockDuration = new AmazonPeekLockDuration(); AmazonSimpleNotificationServiceConfig = new AmazonSimpleNotificationServiceConfig { RegionEndpoint = RegionEndpoint.USWest2 }; AmazonSnsAndSqsTransportOptions = new AmazonSnsAndSqsTransportOptions(); AmazonSqsConfig = new AmazonSQSConfig { RegionEndpoint = RegionEndpoint.USWest2 }; InputQueueAddress = null; MessageSerializer = new AmazonTransportMessageSerializer(); }
public static AmazonSqsTransport CreateTransport(string inputQueueAddress, TimeSpan peeklockDuration, AmazonSnsAndSqsTransportOptions options = null) { var connectionInfo = ConnectionInfo; var amazonSqsConfig = new AmazonSQSConfig { RegionEndpoint = connectionInfo.RegionEndpoint }; var consoleLoggerFactory = new ConsoleLoggerFactory(false); var transport = new AmazonSqsTransport(new AmazonInternalSettings(consoleLoggerFactory, new TplAsyncTaskFactory(consoleLoggerFactory), new FailbackAmazonCredentialsFactory()) { InputQueueAddress = inputQueueAddress, AmazonSqsConfig = amazonSqsConfig, AmazonSnsAndSqsTransportOptions = options ?? new AmazonSnsAndSqsTransportOptions(), AmazonSimpleNotificationServiceConfig = new AmazonSimpleNotificationServiceConfig(), MessageSerializer = new AmazonTransportMessageSerializer() }); transport.Initialize(peeklockDuration); return(transport); }
public ITransport Create(string inputQueueAddress, TimeSpan peeklockDuration, AmazonSnsAndSqsTransportOptions options = null) { return(inputQueueAddress == null?CreateTransport(null, peeklockDuration, options) : _queuesToDelete.GetOrAdd(inputQueueAddress, () => CreateTransport(inputQueueAddress, peeklockDuration, options))); }