RealityServer Features

Further Reading

To use the Queue Manager and AWS services you need to adjust your RealityServer configuration. Details of the relevant configuration directives can be found here:

Since the RealityServer Queue Manager relies on external services it is strongly recommended that you review these services documentation for further details on the options available for those services.

Creating Amazon SQS Queues

While information is provided in the links above for Amazon SQS configuration, the instructions below provide a quick step-by-step guide to creating a queue in SQS to get you started. It is by no means an exhaustive description of Amazon SQS options. Additionally as Amazon regularly update the user interface of their web console the steps required may change over time.

You can create SQS queues easily from the AWS Web Console for SQS. This is the recommended method since queues only need to be created once and are then re-used for the life time of the deployment. It is possible to create queues using the AWS API however instructions for this are not provided here. You need two queues, a Dead Letter Queue and a Job Queue for the queue manager.

Jobs are added to the job queue by the queue manager and then executed, however if for any reason a job fails to execute even after a number of retries it is placed in the dead letter queue. It is recommended to enable CloudWatch notifications on the dead letter queue so that if jobs start failing you are notified.

Note that SQS queues are made for a specific region, so ensure you have the desired region selected in your console before creating. Here is how to add the nesessary queues for the manager to SQS:

  1. First make the dead letter queue by hitting the Create New Queue in the AWS SQS console, then give the queue a name (e.g., Manager_deadletter) and press the Quick-Create Queue button (not the Configure Queue button). Make note of the name as you need it in the next step.
  2. Now make your job queue by hitting the Create New Queue button again, then give the queue a name (e.g., Manager_jobs), but this time hit the Configure Queue button and not the Quick-Create Queue button.
  3. Under the Queue Attributes section set Receive Message Wait Time to 10 seconds. This is important since the default is 0 seconds and this will cause short polling to be used instead of long polling which the system is designed for.
  4. Check the option Use Redrive Policy under the Dead Letter Queue Settings section and enter the name of your dead letter queue in the Dead Letter Queue field. Also enter a Maximum Receives value to tell it how many times you want to retry a job before putting it in the dead letter queue, e.g., 4.

Once you have made your queues, select your job queue and under the Details tab in the information below copy the URL for the queue, you will need this to configure queue_url option in RealityServer. Also note the region which will be part of the URL as this is also needed for the region option.

For the manager to access the queue an AWS access key and secret will be need to be provided as well. These can be restricted through IAM to only have permission to read and write to the specific queue if desired. Please see AWS documentation for further details here Using Identity-Based (IAM) Policies for Amazon SQS.