You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/implementations/aws.md
+70-2Lines changed: 70 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
# Foundatio.AWS
2
2
3
-
Foundatio provides AWS implementations for file storageand queuing using Amazon S3and Amazon SQS. [View source on GitHub →](https://github.com/FoundatioFx/Foundatio.AWS)
3
+
Foundatio provides AWS implementations for file storage, queuing, and messaging using Amazon S3, Amazon SQS, and Amazon SNS. [View source on GitHub →](https://github.com/FoundatioFx/Foundatio.AWS)
For additional options, see [S3FileStorageOptions source](https://github.com/FoundatioFx/Foundatio.AWS/blob/main/src/Foundatio.AWS/Storage/S3FileStorageOptions.cs).
45
46
47
+
## SQSMessageBus
48
+
49
+
AWS SNS/SQS message bus for pub/sub messaging using the SNS fan-out pattern.
50
+
51
+
```csharp
52
+
usingFoundatio.Messaging;
53
+
54
+
varmessageBus=newSQSMessageBus(o=>
55
+
{
56
+
o.ConnectionString=connectionString;
57
+
o.Topic="events";
58
+
// Optional: Specify queue name for durable subscriptions
|`KmsMasterKeyId`|`string`||| KMS key ID for encryption (SSE-KMS) |
87
+
|`KmsDataKeyReusePeriodSeconds`|`int`|| 300 | KMS key reuse period |
88
+
|`TopicResolver`|`Func<Type, string>`||| Route message types to different topics |
89
+
90
+
For additional options, see [SQSMessageBusOptions source](https://github.com/FoundatioFx/Foundatio.AWS/blob/main/src/Foundatio.AWS/Messaging/SQSMessageBusOptions.cs).
91
+
92
+
### Architecture
93
+
94
+
The `SQSMessageBus` uses the SNS fan-out pattern:
95
+
96
+
-**Publishing**: Messages are published to an SNS topic
97
+
-**Subscribing**: Each subscriber gets its own SQS queue subscribed to the SNS topic
98
+
-**Durable Subscriptions**: Use `SubscriptionQueueName` and set `SubscriptionQueueAutoDelete = false` to persist queues across restarts
99
+
-**Policy Management**: Queue policies are automatically configured to allow SNS to deliver messages
100
+
101
+
### Durable Subscriptions Example
102
+
103
+
```csharp
104
+
varmessageBus=newSQSMessageBus(o=>
105
+
{
106
+
o.ConnectionString=connectionString;
107
+
o.Topic="events";
108
+
o.SubscriptionQueueName="order-service-events";
109
+
o.SubscriptionQueueAutoDelete=false; // Queue persists across restarts
110
+
});
111
+
```
112
+
46
113
## SQSQueue
47
114
48
-
AWS SQS queue implementation.
115
+
AWS SQS queue implementation for reliable work item processing.
49
116
50
117
```csharp
51
118
usingFoundatio.Queues;
@@ -77,4 +144,5 @@ For additional options, see [SQSQueueOptions source](https://github.com/Foundati
@@ -178,5 +178,5 @@ When building several large cloud applications we found a lack of great solution
178
178
-[**Foundatio.CommandQuery**](https://github.com/FoundatioFx/Foundatio.CommandQuery) - CQRS framework with Entity Framework Core and MongoDB support, built on Foundatio.Mediator.
179
179
-[**Foundatio.Lucene**](https://lucene.foundatio.dev) - Lucene-style query parser with AST, visitor pattern, Entity Framework Core integration, and Elasticsearch Query DSL generation.
180
180
-[**Foundatio.Mediator**](https://mediator.foundatio.dev) - Blazingly fast, convention-based C# mediator powered by source generators and interceptors. Near-direct call performance with zero runtime reflection.
181
-
-[**Foundatio.Parsers**](https://github.com/FoundatioFx/Foundatio.Parsers) - Extensible Lucene-style query syntax parser with Elasticsearch integration.
182
-
-[**Foundatio.Repositories**](https://github.com/FoundatioFx/Foundatio.Repositories) - Generic repository pattern implementation with Elasticsearch support, caching, and message bus integration.
181
+
-[**Foundatio.Parsers**](https://parsers.foundatio.dev) - Extensible Lucene-style query syntax parser with Elasticsearch integration, field aliases, query includes, and validation.
182
+
-[**Foundatio.Repositories**](https://repositories.foundatio.dev) - Production-grade repository pattern implementation with Elasticsearch support, caching, messaging, soft deletes, and document versioning.
0 commit comments