This sample application demonstrates how to use the AWS Message Processing Framework for .NET with Polly for resilient message processing. It showcases integration between SQS message processing and Polly’s retry policies.
This sample demonstrates:
PollyIntegration/
├── MessageHandlers/
│ └── ChatMessageHandler.cs # Sample message handler
├── Models/
│ └── ChatMessage.cs # Message type definition
├── Program.cs # Application entry point
├── PollyBackoffHandler.cs # Custom Polly integration
└── appsettings.json # Application configuration
You can test the application using one of these two methods:
You can send a test message to your SQS queue using the AWS Console or AWS CLI:
Using AWS CLI:
$messageBody = "{""""type"""":""""chatMessage"""",""""id"""":""""123"""",""""source"""":""""test"""",""""specversion"""":""""1.0"""",""""time"""":""""2024-01-01T00:00:00Z"""",""""data"""":""""{\\""""messageDescription\\"""":\\""""Test message\\""""}""""}"
aws sqs send-message --queue-url YOUR_QUEUE_URL --message-body $messageBody
Replace YOUR_QUEUE_URL with your actual SQS queue URL.