Helpful.Aws.Sqs.Receiver

This is a very simple DotNet Standard 2.0 package for receiving messages from AWS SQS in as simple a manner as I think is possible.

Source code is on github https://github.com/RokitSalad/Helpful.Aws.Sqs.Receiver

The package is available on nuget.org: https://www.nuget.org/packages/Helpful.Aws.Sqs.Receiver

The package provides a few useful features which you don’t get by default when using the AWS SDK directly:

  1. A default configuration which works for many situations.
  2. An internal queue to allow the receipt of multiple messages at once without adding complexity to the code receiving each message.
  3. Cancellation token handling which allows the internal queue to run to the end before terminating the service.
  4. Direct access to the internal queue as an IEnumerable, so you’ll never lose messages even in an exception state.
  5. 2 lines of code to receive your first message:
IMessageReceiver messageReceiver = ReceiverFactory.GetReceiver("your aws access key", "your aws secret key", "your aws region", "the url to your queue", CancellationToken.None);
ReceivedMessage message = await messageReceiver.NextMessageAsync();

There will be a handful of further features to follow, but the intention is for this to be as light weight as possible – it’s just to grease the cogs a little.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s