Official Content

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:

Samples

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"
&region = !"us-east-1"

&AWSBasicCredentials.AccessKey = &accessKey //AWSBasicCredentials, AWSCore
&AWSBasicCredentials.SecretKey = &secretKey
&AWSBasicCredentials.Region = &region

&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.

Last update: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant