AmazonMessageOptions Class
Definition
- Namespace
- Savvyio.Extensions.SimpleQueueService
- Assemblies
- Savvyio.Extensions.SimpleQueueService.dll
Configuration options that is related to AWS SQS and AWS SNS.
public class AmazonMessageOptions : IValidatableParameterObject, IParameterObject
- Inheritance
-
objectAmazonMessageOptions
- Implements
- Derived
Examples
Configure an AmazonMessageOptions with the AWS credentials, endpoint region, and SQS queue URL required for Amazon SQS message delivery.
using System;
using Amazon;
using Amazon.Runtime;
using Savvyio.Extensions.SimpleQueueService;
namespace ExampleApp;
public class AmazonSetup
{
public static AmazonMessageOptions CreateOptions()
{
var options = new AmazonMessageOptions
{
Credentials = new AnonymousAWSCredentials(),
Endpoint = RegionEndpoint.EUWest1,
SourceQueue = new Uri("https://sqs.eu-west-1.amazonaws.com/123456789012/account-commands")
};
return options;
}
}
Constructors
| Name | Description |
|---|---|
| AmazonMessageOptions() | Initializes a new instance of the AmazonMessageOptions class. |
Fields
| Name | Description |
|---|---|
| DefaultVisibilityTimeoutInSeconds | The default amount of seconds that a message can be hidden from other consumers in AWS SQS after it has been received. |
| MaxNumberOfMessages | The maximum number of messages that AWS SQS supports when sending or retrieving. |
| MaxPollingWaitTimeInSeconds | The maximum amount of seconds that a call waits for a message to arrive in AWS SQS. |
| MaxVisibilityTimeoutInSeconds | The maximum amount of seconds that a message can be hidden from other consumers in AWS SQS after it has been received. |
Properties
| Name | Description |
|---|---|
| ClientConfigurations | Gets the client configuration for AWS SQS/SNS provided by ConfigureClient(Action<ClientConfig>). |
| Credentials | Gets or sets the credentials required to connect to AWS SQS/SNS. |
| Endpoint | Gets or sets the endpoint required to connect to AWS SQS/SNS. |
| ReceiveContext | Gets the options related to receive operations on AWS SQS. |
| SourceQueue | Gets or sets the URI that represents an AWS SQS/SNS endpoint. |
Methods
| Name | Description |
|---|---|
| ConfigureClient(Action<ClientConfig>) | Provides a flexible way to configure client configurations for both AWS SQS/SNS in a single call. |
| ValidateOptions() | Determines whether the public read-write properties of this instance are in a valid state. |