Plugin Documentation

QueueCast
Amazon SQS & SNS for Blueprints and C++

Send, receive and listen to SQS queue messages, publish SNS notifications and register devices for mobile push straight from your game, with Amazon Cognito credentials, built on the official AWS SDK for C++.

v1.0
UE 4.27 & 5.8
Win64, Linux & Android
Category Networking
Alpha XP

Overview

QueueCast connects Unreal Engine 4.27 and 5.8 to Amazon Simple Queue Service (SQS) and Amazon Simple Notification Service (SNS). Use queues for reports, telemetry, match results and jobs for your backend, listen to a queue for server events, publish notifications to topics and register players' devices for mobile push. Requests run on background worker threads with automatic retries; every result arrives back on the game thread.

  • Send Message / Send Message Batch: string attributes, delays, FIFO group and deduplication ids; batches of any size, 10 per request, per-entry results.
  • Receive Messages: long polling, visibility timeout, attributes and receive count.
  • Listen To Queue: a listener that keeps long-polling until stopped and fires On Message for every message, with optional auto-delete and back-off on errors.
  • Delete Message, Delete Message Batch, Change Message Visibility, Get Queue Url (cached), Get Queue Attributes.
  • SNS Publish to a topic, a single device (platform endpoint) or a phone number (SMS).
  • Register Push Device: Firebase Cloud Messaging / APNs tokens to SNS platform endpoints, kept up to date automatically.
  • Subscribe, Unsubscribe, Set Push Endpoint Enabled.
  • Amazon Cognito identity pools for guests and signed-in players; static keys and the default AWS chain for development and servers.

Requirements

RequirementDetails
Unreal Engine4.27 and 5.8
PlatformsWin64, Linux and Android
ModulesQueueCast (Runtime), QueueCastSdk (prebuilt AWS SDK for C++ 1.11.916 in Source/ThirdParty)
DependenciesNo other plugins. On Linux and Android the SDK uses the engine's libcurl, OpenSSL and certificate store.
AWSAn AWS account. SQS, SNS (including SMS and mobile push) and Cognito usage is billed by AWS.

Installation

  1. Install QueueCast from Fab into your engine, or copy the QueueCast folder into your project's Plugins folder.
  2. Enable QueueCast in Edit > Plugins and restart the editor.
  3. Open Project Settings > Plugins > QueueCast and set Region, Identity Pool Id and, if you like, a Default Queue and Default Topic Arn.
  4. C++ only: add PublicDependencyModuleNames.Add("QueueCast"); to your Build.cs.
Several AWS plugins in one projectEach Alpha XP cloud plugin carries its own copy of the SDK under a plugin-specific name, so they install side by side without conflicts.

Setting up AWS

  1. In the SQS console create your queues (Standard, or FIFO with a .fifo name for strict ordering). Use a common prefix such as mygame-.
  2. For notifications create SNS topics. For mobile push create a platform application (Firebase Cloud Messaging or APNs) and note its ARN.
  3. In Amazon Cognito create an identity pool. Enable guest access if players may use queues before signing in, and add your identity providers.
  4. Edit the IAM role the pool gives to players so it may call only the actions QueueCast uses, and only on your game's resources. Leave out every statement you do not need:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "SendReports",
      "Effect": "Allow",
      "Action": ["sqs:GetQueueUrl", "sqs:SendMessage", "sqs:GetQueueAttributes"],
      "Resource": "arn:aws:sqs:us-east-1:123456789012:mygame-reports"
    },
    {
      "Sid": "ReadOwnInbox",
      "Effect": "Allow",
      "Action": ["sqs:GetQueueUrl", "sqs:ReceiveMessage", "sqs:DeleteMessage", "sqs:ChangeMessageVisibility"],
      "Resource": "arn:aws:sqs:us-east-1:123456789012:mygame-events"
    },
    {
      "Sid": "PublishToGameTopic",
      "Effect": "Allow",
      "Action": "sns:Publish",
      "Resource": "arn:aws:sns:us-east-1:123456789012:mygame-player-events"
    },
    {
      "Sid": "RegisterPushDevice",
      "Effect": "Allow",
      "Action": "sns:CreatePlatformEndpoint",
      "Resource": "arn:aws:sns:us-east-1:123456789012:app/GCM/MyGame"
    },
    {
      "Sid": "ManageOwnEndpoint",
      "Effect": "Allow",
      "Action": ["sns:GetEndpointAttributes", "sns:SetEndpointAttributes"],
      "Resource": "arn:aws:sns:us-east-1:123456789012:endpoint/GCM/MyGame/*"
    },
    {
      "Sid": "PushTopicSubscribe",
      "Effect": "Allow",
      "Action": "sns:Subscribe",
      "Resource": "arn:aws:sns:us-east-1:123456789012:mygame-news",
      "Condition": { "StringEquals": { "sns:Protocol": "application" } }
    },
    {
      "Sid": "PushTopicUnsubscribe",
      "Effect": "Allow",
      "Action": "sns:Unsubscribe",
      "Resource": "arn:aws:sns:us-east-1:123456789012:mygame-news"
    }
  ]
}

Batch nodes need the same actions as their single versions (sqs:SendMessage, sqs:DeleteMessage). sqs:GetQueueUrl is not needed when you pass queue URLs or set Queue Url Prefix. Queues and topics encrypted with a customer managed KMS key also need kms:GenerateDataKey and kms:Decrypt on that key.

Players can send anything you allowEvery player holds the role's permissions and can call the allowed actions with any content, not only through your game. Treat every message that came from a client as untrusted input: validate it in the consumer, never grant rewards, currency or progress because a client message says so, and rate-limit on the backend. Give clients sqs:SendMessage only on queues your backend reads, and sqs:ReceiveMessage / sqs:DeleteMessage only on queues whose content every player may see and remove. Never allow sns:Publish on "*": that includes SMS to any phone number at your cost. Keep sns:Subscribe limited to the application protocol so players cannot subscribe e-mail addresses or web hooks.
Never ship access keysStatic keys in the settings end up in DefaultGame.ini and in packaged games. Use them only for development and dedicated servers; players should always use the identity pool. Shipping builds refuse settings keys unless Allow Static Keys In Shipping is enabled.

Quick start

Send a message

  1. Add Send Message. Queue mygame-reports (a name or a full URL), Body {"type":"bug","text":"..."}.
  2. On Success returns the Message Id; On Failure carries Error > Code and Message.

Listen to a queue

  1. On Begin Play add Listen To Queue with Queue mygame-events and Auto Delete on. Promote the return value to a variable.
  2. From On Message read Message > Body. If the queue is subscribed to an SNS topic, use Unwrap SNS Notification first.
  3. Call Stop Listening on the variable when you no longer need messages. The listener also stops by itself when its world is torn down (end of play, level change).

Push notifications

  1. Get the device's push token (for example the Firebase Cloud Messaging token from your push plugin).
  2. Call Register Push Device with the token and, as Custom User Data, your player id. Save the returned endpoint ARN and pass it as Existing Endpoint Arn on the next start.
  3. Your backend publishes to the endpoint or to a topic the endpoint is subscribed to (Subscribe with Protocol application).

SQS nodes

All latent nodes run in the background, can be stopped with Cancel on their return value and fire exactly one final pin on the game thread. Queue takes a queue name or URL; empty = the settings' Default Queue.

NodeInputsOutputsDescription
Send MessageQueue, Body, Delay Seconds, Attributes, Message Group Id, Deduplication IdOn Success / On Failure (Result, Error)Sends one message (up to 256 KB). Attributes are sent as String attributes; entries with an empty name or value are skipped. FIFO queues need a Message Group Id and, without content-based deduplication, a Deduplication Id.
Send Message BatchQueue, EntriesOn Completed (Results, Failed Count)Sends every entry, 10 per request. Results are in the order of Entries; one entry can fail while the others are sent (Error Code, Sender Fault per entry).
Receive MessagesQueue, Max Messages (1-10), Wait Seconds, Visibility TimeoutOn Success / On Failure (Messages, Error)One receive with long polling: waits up to Wait Seconds (0-20, -1 = settings) for messages. An empty array is a normal result. Received messages are hidden for the visibility timeout: delete them once handled, otherwise they come back.
Delete MessageQueue, Receipt HandleOn Success / On Failure (Error)Removes a handled message. Pass the message's Queue Url and Receipt Handle.
Delete Message BatchQueue, Receipt HandlesOn Completed (Results, Failed Count)Removes many messages, 10 per request; results in the order of Receipt Handles.
Change Message VisibilityQueue, Receipt Handle, Visibility TimeoutOn Success / On Failure (Error)Hides a received message for the given seconds from now (0-43200). 0 gives it back to the queue at once; a larger value buys time for long work.
Get Queue UrlQueue NameOn Success / On Failure (Value = URL, Error)Looks up a queue URL. Every node does this for you on first use of a name and caches the result.
Get Queue AttributesQueueOn Success / On Failure (Info, Error)Approximate waiting / in-flight / delayed counts, visibility timeout, FIFO flag, ARN and every other attribute by name.

Listen To Queue

Listen To Queue (Queue, Auto Delete, Max Messages, Wait Seconds, Visibility Timeout) keeps long-polling one queue in the background until it is stopped. Pins:

Pin / functionDescription
On Message (Message)Fires on the game thread for every received message, one after another. The next receive starts after all messages of the previous one were delivered.
Auto DeleteOn: each delivered message is deleted after its On Message ran. Off: delete messages yourself with Delete Message, or they come back after the visibility timeout.
On Error (Error)Fires for every failed receive. Network errors and throttling are retried after a pause that doubles from 1 second up to Listener Max Backoff Seconds.
On Stopped (Error)Fires when the listener stops by itself because of an error that will not go away by retrying (no permission, unknown queue, missing settings).
Stop ListeningStops the listener (same as Cancel). No pin fires afterwards. Messages received but not delivered yet return to the queue after their visibility timeout.
Is FinishedTrue once the listener stopped.
Worker threadsA listener occupies one worker thread while it waits for messages. With the default 4 workers, raise Worker Threads in the settings if you run more than two listeners at the same time.
Shutting downStopping aborts a waiting receive as soon as the HTTP client allows; on Win64 the receive that is in progress can finish its wait first (up to Wait Seconds) when the game closes. A shorter Default Wait Seconds shortens that wait.

SNS nodes

NodeInputsOutputsDescription
SNS PublishTarget, Message, Subject, Attributes, Message Group Id, Deduplication Id, Json Message StructureOn Success / On Failure (Result, Error)Target is a topic ARN, a platform endpoint ARN (push to one device) or a phone number in E.164 format such as +15551234567 (SMS); empty = the settings' Default Topic Arn. With Json Message Structure the Message is a JSON object with one text per protocol, for example {"default":"Hi","GCM":"{\"notification\":{\"title\":\"Hi\"}}"}.
Register Push DeviceDevice Token, Custom User Data, Existing Endpoint Arn, Platform Application ArnOn Success / On Failure (Value = endpoint ARN, Error)Creates or repairs the platform endpoint of a push token. See Mobile push.
SubscribeTopic Arn, Endpoint, Attributes, ProtocolOn Success / On Failure (Value = subscription ARN, Error)Subscribes an endpoint to a topic. Protocol application for platform endpoints (default), or sqs, email, sms, lambda, https. Attributes such as FilterPolicy = {"region":["eu"]} or RawMessageDelivery = true.
UnsubscribeSubscription ArnOn Success / On Failure (Error)Removes a subscription.
Set Push Endpoint EnabledEndpoint Arn, EnabledOn Success / On Failure (Error)Turns push delivery to one device on or off, for example from your options menu.

Mobile push

Register Push Device follows the token management flow AWS recommends:

  1. Without an Existing Endpoint Arn it creates the endpoint. When SNS answers that the token already exists with other attributes, the existing endpoint is reused and updated.
  2. It then reads the endpoint. A deleted endpoint is created again; a different token, a disabled endpoint or changed Custom User Data are updated (Enabled = true).
  3. On Success returns the endpoint ARN. Save it (for example in a save game) and pass it back next time so each device keeps one endpoint.

Getting the token itself is platform specific (Firebase Cloud Messaging on Android). QueueCast does not show notifications on the device; that is the job of the operating system and your push setup.

Functions

NodeDescription
Unwrap SNS NotificationFor a queue subscribed to a topic without raw message delivery: returns the original Message, Subject, Topic Arn and Attributes of the SNS envelope in a message Body. Returns false (Message = Body) for other bodies.
Resolve IdentityLatent: fetches the Cognito identity and credentials now, for example right after login. Value = the identity id.
Set RegionSwitches the AWS region for every following request.
Set Credential ModeOverrides the credential mode from the settings at runtime.
Set Login TokenSigns the player in to the identity pool with a provider token (Cognito user pool, Google, Apple, Facebook, OpenID).
Clear Login TokensForgets all login tokens and the cached identity; the player becomes a guest.
Set Static CredentialsUses the given keys from now on (Static Keys mode), for example temporary keys handed out by your backend.
Get Identity IdThe player's Cognito identity id; empty until credentials were resolved once.
Make User Pool Provider NameBuilds the login key of a Cognito user pool: cognito-idp.<region>.amazonaws.com/<pool id>.
Is ConfiguredReturns false and a reason when the settings are incomplete.
CancelOn a latent node's return value: none of its pins fire any more (on a listener: stops it).
Is FinishedOn a latent node's return value: true after it finished or was cancelled.

Credentials

ModeUse forHow
Cognito Identity PoolGame clientsGuests get unauthenticated credentials; after Set Login Token the player gets the authenticated role. Credentials refresh automatically before they expire.
Static KeysDevelopment, dedicated servers, keys from your backendSettings keys or Set Static Credentials (with an optional session token).
Default Credential ChainServers and toolsEnvironment variables, the ~/.aws profile, ECS and EC2 instance roles.

Give the authenticated role more than the guest role, for example only signed-in players may register push devices.

C++ API

// Build.cs: PublicDependencyModuleNames.Add("QueueCast");
#include "QueueCastLibrary.h"

TMap<FString, FString> Attributes;
Attributes.Add(TEXT("type"), TEXT("bug"));
UQueueCastLibrary::SendToQueueNative(TEXT("mygame-reports"), TEXT("{\"text\":\"...\"}"), Attributes,
    FQueueCastNativeDelegate::CreateLambda([](const FQueueCastSendResult& Result, const FQueueCastError& Error)
    {
        // runs on the game thread; Error.Code is empty on success
    }));

UQueueCastLibrary::PublishNative(TEXT("arn:aws:sns:us-east-1:123456789012:mygame-player-events"),
    TEXT("Level complete"), FString(), FQueueCastNativeDelegate());

The latent node classes (UQueueCastListenAction and the others) can also be created from C++ through their static factory functions; bind the dynamic delegates, then call Activate().

Types

TypeKindMembers
FQueueCastMessageStructMessage Id, Body, Receipt Handle, Attributes, System Attributes, Receive Count, Sent Time, Message Group Id, Queue Url
FQueueCastSendResultStructMessage Id, Sequence Number
FQueueCastBatchEntryStructBody, Delay Seconds, Attributes, Message Group Id, Deduplication Id
FQueueCastBatchResultStructIndex, Success, Message Id, Sequence Number, Error Code, Error Message, Sender Fault
FQueueCastQueueInfoStructQueue Url, Queue Arn, Approximate Messages, Approximate Messages In Flight, Approximate Messages Delayed, Visibility Timeout, Fifo, Attributes
FQueueCastErrorStructCode, Message, Http Status, Retryable
EQueueCastCredentialModeEnumCognito Identity Pool, Static Keys, Default Credential Chain

Settings

Project Settings > Plugins > QueueCast (saved to DefaultGame.ini). Changes apply to the next request.

SettingDefaultDescription
Regionus-east-1Region of your queues, topics and identity pool.
Credential ModeCognito Identity PoolCognito Identity Pool, Static Keys or Default Credential Chain.
Identity Pool Id(empty)For example us-east-1:01234567-89ab-cdef-0123-456789abcdef.
Allow Guest AccessOnUnauthenticated identities before Set Login Token. The pool must allow guest access too.
Access Key Id / Secret Access Key(empty)Static Keys mode. Saved in DefaultGame.ini - development and servers only.
Allow Static Keys In ShippingOffStatic keys from the settings are refused in Shipping builds unless enabled (dedicated servers).
Endpoint Override(empty)Custom endpoint such as a local emulator (http://localhost:4566).
Request Timeout Ms / Connect Timeout Ms30000 / 5000Time limits per request. Long polls are kept at least 5 seconds shorter than the request timeout.
Max Retries3Automatic retries with exponential back-off for throttling and transient errors.
Worker Threads4Background threads that run requests (each running listener uses one).
Verify SSLOnOnly disable for a local emulator.
Log Sdk WarningsOnForwards SDK warnings and errors to LogQueueCast.
Default Queue(empty)Queue name or URL used when a node leaves Queue empty.
Queue Url Prefix(empty)For example https://sqs.us-east-1.amazonaws.com/123456789012/ - names become URLs without a Get Queue Url request.
Queue Owner Account Id(empty)Account that owns the queues when it is not the account of the credentials.
Default Wait Seconds10Long-poll time (0-20) when a receive node or listener leaves Wait Seconds at -1.
Default Visibility Timeout0Visibility timeout when a node leaves it at -1; 0 = the queue's own setting.
Listener Max Backoff Seconds30Longest pause between listener retries after errors.
Default Topic Arn(empty)Topic used when SNS Publish or Subscribe leaves the topic empty.
Platform Application Arn(empty)Platform application used when Register Push Device leaves it empty.

Troubleshooting

Error codeCause and fix
NotConfiguredSet the Identity Pool Id in Project Settings > Plugins > QueueCast, or the Default Queue / Default Topic Arn / Platform Application Arn the node relies on.
NotAuthorizedExceptionGuest access is off on the identity pool, or a login token expired. Enable guest access or call Set Login Token with a fresh token.
AccessDenied / AuthorizationErrorThe identity pool role does not allow the SQS or SNS action on that resource. Update the role policy (see Setting up AWS).
QueueDoesNotExistWrong queue name, region, Queue Url Prefix or Queue Owner Account Id.
InvalidParameterValueUsually a FIFO queue without Message Group Id, a Delay Seconds on a FIFO queue, or a body or batch over 256 KB.
InvalidTargetSNS Publish Target is neither an ARN nor a phone number starting with +.
EndpointDisabledThe push service rejected the device token. Call Register Push Device again with a fresh token.
UnavailableThe SDK library could not be loaded or the engine is shutting down. Check the Output Log for LogQueueCast errors.
Messages arrive twiceStandard queues deliver at least once, and a message comes back when it was not deleted within its visibility timeout. Make handlers idempotent, delete messages, or use a FIFO queue.

Credits

© 2026 Alpha XP — alphaxp.net · Support: support@alphaxp.net. Includes the AWS SDK for C++ and the AWS Common Runtime (Apache License 2.0). For Unreal Engine 4.27 and 5.8.