The SQS component enables users to send messages to standard AWS SQS queues and to FIFO AWS SQS queues.

Take a look at the configuration parameters of the component:

  • Account: for the component to make the authentication to AWS Cloud service, it's necessary to use a BASIC-type account. To know more about these accounts and other existing types, click here.

  • Message: the message body to be sent. This parameter supports Double Braces.

  • Name of the Queue: AWS queue name.

  • Connection String: the destination URL for the SQS queue in AWS.

  • Region: the region where the AWS queue is registered.

  • Queue Type: the type of queue that will receive a message. It can be a Standard queue or a FIFO queue. If FIFO is selected, another parameter is necessary:

    - Message Group ID: for FIFO queues, this is the ID of a message group in this queue.

  • failOnError: when activated, this parameter suspends the pipeline execution. Otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.

Some of the parameters above support Double Braces. To better understand how this language works, read our article by clicking here.

Messages flow

1. Standard AWS SQS queues (without errors)

Input

{
"url": "https://sqs.sa-east-1.amazonaws.com/123456789012/digibee-test",
"typeQueue":"STANDARD",
"queue": "digibee-test",
"messageBody": "{
"test": "Test encryption"
}",
"region": "sa-east-1",
"failOnError": false
}

Output

{
"messageId":"c959b1da-6650-46c2-8baf-62302789dd61",
"messageBodyMD5":"c35f05f412ea94ef45bf103ba96b7b0e",
"sequenceNumber":null,
"success":true,
"requestId":"6c950c3a-d081-5685-893b-55cf8c1b51e0"
}

2. FIFO AWS SQS queues (without errors)

Input

{
"url": "https://sqs.sa-east-1.amazonaws.com/123456789012/digibee-test.fifo",
"typeQueue":"FIFO",
"messageGroupId":"mygroup",
"queue": "digibee-test.fifo",
"messageBody": "{
"test": "Test encryption"
}",
"region": "sa-east-1",
"failOnError": false
}

Output

{
"messageId":"c959b1da-6650-46c2-8baf-62302789dd61",
"messageBodyMD5":"c35f05f412ea94ef45bf103ba96b7b0e",
"sequenceNumber":"18865425420279279616",
"success":true,
"requestId":"6c950c3a-d081-5685-893b-55cf8c1b51e0"
}

3. FIFO AWS SQS queue (withouth messageGroupId):

Input

{
"url": "https://sqs.sa-east-1.amazonaws.com/123456789012/digibee-test.fifo",
"typeQueue":"FIFO",
"queue": "digibee-test.fifo",
"messageBody": "{
"test": "Test encryption"
}",
"region": "sa-east-1",
"failOnError": false
}

Output

{
"success":false,
"message":"There is an invalid pipeline configuration",
"error":"com.digibee.pipelineengine.exception.PipelineEngineConfigurationException: Configuration parameter 'messageGroupId' cannot be null for connector sqs-connector"

}

4. AWS SQS queue (invalid region)

Input

{
"url": "https://sqs.sa-east-1.amazonaws.com/123456789012/digibee-test",
"typeQueue":"STANDARD",
"queue": "digibee-test",
"messageBody": "{
"test": "Test encryption"
}",
"region": "wrong-region",
"failOnError": false
}

Output

{
"success":false,
"message":"Something went wrong while trying to execute SQS CONNECTOR",
"error":"com.amazonaws.services.sqs.model.AmazonSQSException: Credential should be scoped to a valid region, not 'wrong-region'. (Service: AmazonSQS; Status Code: 403; Error Code: SignatureDoesNotMatch; Request ID: bf47d091-2129-5320-a332-89647ef0d86b)"
}

To better understand the Platform messages flow, click here and read our article.

Did this answer your question?