https://github.com/shuttle/shuttle.esb.amazonsqs
Amazon SQS implementation for use with Shuttle.Esb.
https://github.com/shuttle/shuttle.esb.amazonsqs
Last synced: about 2 months ago
JSON representation
Amazon SQS implementation for use with Shuttle.Esb.
- Host: GitHub
- URL: https://github.com/shuttle/shuttle.esb.amazonsqs
- Owner: Shuttle
- License: bsd-3-clause
- Created: 2021-01-21T11:13:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-02T05:45:36.000Z (3 months ago)
- Last Synced: 2025-03-02T06:24:57.451Z (3 months ago)
- Language: C#
- Size: 85 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Amazon SQS
```
PM> Install-Package Shuttle.Esb.AmazonSqs
```In order to make use of the `AmazonSqsQueue` you will need access to an [Amazon Web Services](https://aws.amazon.com/sqs/) account. There are some options for local development, such as [ElasticMQ](https://github.com/softwaremill/elasticmq), which are beyond the scope of this documentation.
You may also want to take a look at [Messaging Using Amazon SQS](https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/sqs-apis-intro.html).
## Configuration
The URI structure is `amazonsqs://configuration-name/queue-name`.
```c#
services.AddAmazonSqs(builder =>
{
var amazonSqsOptions = new AmazonSqsOptions
{
ServiceUrl = "http://localhost:9324",
MaxMessages = 1,
WaitTime = TimeSpan.FromSeconds(20)
};amazonSqsOptions.Configure += (sender, args) =>
{
Console.WriteLine($"[event] : Configure / Uri = '{((IQueue)sender).Uri}'");
};builder.AddOptions("local", amazonSqsOptions);
});
```The `Configure` event `args` arugment exposes the `AmazonSQSConfig` directly for any specific options that need to be set.
The default JSON settings structure is as follows:
```json
{
"Shuttle": {
"AmazonSqs": {
"local": {
"ServiceUrl": "http://localhost:9324",
"MaxMessages": 5,
"WaitTime": "00:00:20"
},
"proper": {
"ServiceUrl": "https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue"
}
}
}
}
```## Options
| Option | Default | Description |
| --- | --- | --- |
| `ServiceUrl` | | The URL to connect to. |
| `MaxMessages` | `10` | Specifies the number of messages to fetch from the queue. |
| `WaitTime` | `00:00:20` | Specifies the `TimeSpan` duration to perform long-polling. |