Class AmazonCommandQueueOptions<TMarker>
- Assembly
- Savvyio.Extensions.DependencyInjection.SimpleQueueService.dll
Configuration options for AmazonCommandQueue<TMarker>.
public class AmazonCommandQueueOptions<TMarker> : AmazonCommandQueueOptions, IValidatableParameterObject, IParameterObject, IDependencyInjectionMarker<TMarker>
Type Parameters
TMarker
- Inheritance
-
AmazonCommandQueueOptions<TMarker>
- Implements
-
IDependencyInjectionMarker<TMarker>
- Inherited Members
Examples
AmazonCommandQueueOptions<TMarker> configures the DI-registered SQS command queue with AWS credentials, endpoint, and the SQS queue URL. The options are passed through the AddAmazonCommandQueue setup delegate.
using System;
using Amazon;
using Amazon.Runtime;
using Microsoft.Extensions.DependencyInjection;
using Savvyio.Extensions.DependencyInjection.SimpleQueueService;
using Savvyio.Extensions.SimpleQueueService.Commands;
namespace ExampleApp;
public class DiCommandQueueRegistration
{
public static AmazonCommandQueueOptions CreateAndInspect()
{
var options = new AmazonCommandQueueOptions
{
Credentials = new AnonymousAWSCredentials(),
Endpoint = RegionEndpoint.EUWest1,
SourceQueue = new Uri("https://sqs.eu-west-1.amazonaws.com/123456789012/commands")
};
Console.WriteLine($"Queue: {options.SourceQueue}");
return options;
}
}