IQueue.SimpleQueue (Amazon SQS)

Amazon Simple Queue Service (SQS) has been implemented as IQueue. SQS Queues can be defined on the fly and auto-created the same as other queue stores. Since SQS queues are accessed via HTTPS, there were some development considerations from a performance perspective. There are three config driven keys which impact SQS behavior in QBO:

  • SQSQueueCountCheckExpirationSeconds - This determines the time in which QBO caches the count of records in a given SQS queue. This value is cached to reduce the number of realtime HTTP calls to SQS. Default value is 5 seconds.
  • SQSQueueUrlGetExpirationMinutes - As part of setup of a SQS queue, Amazon creates a unique QueueUrl for each queue. QBO locates and stores the QueueUrl in cache to eliminate lookups every time. Default value is 10 minutes
  • SQSVisibilityTimeout - This controls the duration of time a SQS message is unavailable to other applications once it's been "popped" for processing.  As part of the SQS processing model and adhering to the QBO IQueue model, messages are processed by first being popped of the stack and upon completion they are ended. Default value is 1 hour (measured in seconds).

Known Limitations

  • Processing Selected Records - Queue.ashx and IQueue support searching and processing selected records based on given criteria. The Amazon SQS API does not support searching for records based on criteria. As a result, queued items can be located in the UI but are unable to be processed by checking and processing. The Queuing page allows the user to "Process Next Item" which coincides with processing the next item Amazon SQS makes available.
  • Deleting Selected Records - Queue.ashx and IQueue support searching and deleting selected records based on given criteria. The Amazon SQS API does not support searching for records based on criteria. As a result, queued items can be located in the UI but are unable to be deleted by checking and deleting. The Queuing page allows the user to "Delete Next Item" which coincides with popping the next item Amazon SQS makes available.
  • Queue Purge - Queue.ashx supports purging of queues. With SQS, the purge will actually delete the queue and upon redraw the UI will attempt to auto create the queue as it detects it no longer exists. Amazon enforces a standard 60 second wait time before a queue can be re-created with the same name. SQS will throw an exception as it will attempt to autocreate under the 60 second wait period and this is reflected in the UI.

Additional Resources

Comments