public static void PurgeQueue(string queueName) { var consoleLoggerFactory = new ConsoleLoggerFactory(false); var connectionInfo = AmazonSqsTransportFactory.ConnectionInfo; var amazonSqsConfig = new AmazonSQSConfig { RegionEndpoint = connectionInfo.RegionEndpoint }; var credentials = new BasicAWSCredentials(connectionInfo.AccessKeyId, connectionInfo.SecretAccessKey); var transport = new AmazonSQSTransport( queueName, credentials, amazonSqsConfig, consoleLoggerFactory, new TplAsyncTaskFactory(consoleLoggerFactory) ); transport.Purge(); }
public static AmazonSQSTransport CreateTransport(string inputQueueAddress, TimeSpan peeklockDuration, AmazonSQSTransportOptions options = null) { var connectionInfo = ConnectionInfo; var amazonSqsConfig = new AmazonSQSConfig { RegionEndpoint = connectionInfo.RegionEndpoint }; var consoleLoggerFactory = new ConsoleLoggerFactory(false); var credentials = new BasicAWSCredentials(connectionInfo.AccessKeyId, connectionInfo.SecretAccessKey); var transport = new AmazonSQSTransport( inputQueueAddress, credentials, amazonSqsConfig, consoleLoggerFactory, new TplAsyncTaskFactory(consoleLoggerFactory), options ); transport.Initialize(peeklockDuration); transport.Purge(); return(transport); }
protected override void SetUp() { _brilliantQueueName = TestConfig.GetName("roundtrippin"); _transport = AmazonSqsTransportFactory.CreateTransport(_brilliantQueueName, TimeSpan.FromSeconds(30)); _transport.Purge(); }