The purpose of this article is to explain the necessary steps to connect to a Queue (for sending and receiving messages) using the Queue API. For this, you have to use the MessageQueueProvider External object.
The providers supported are Azure Queue Storage and AWS SQS.
So, there is a different External Object for each one:
The following code is the one used to connect to AWS SQS:
&queueURL = !"https://sqs.us-east-1.amazonaws.com/xxxx/gxfullgx-test-queueapi"
&accessKey = !"xxxx"
&secretKey = !"xxxxx"
®ion = !"us-east-1"
&AWSBasicCredentials.AccessKey = &accessKey //AWSBasicCredentials, AWSCore
&AWSBasicCredentials.SecretKey = &secretKey
&AWSBasicCredentials.Region = ®ion
&MessageQueue = AWSQueue.MessageQueueProvider.Connect(&AWSBasicCredentials,&queueURL,&errorMessages,&isOK)
To connect to the queue without hard coding the credentials and using Environment variables, click here: Queue API domains.