Skip to Content

Amazon SQS Delete Messages activity

Introduction

An Amazon SQS Delete Messages activity, using its Amazon SQS connection, deletes messages from an Amazon SQS queue and is intended to be used as a target in an operation.

This activity uses the DeleteMessage action from the Amazon SQS API.

Prerequisites

To successfully use this activity, you must have the following AWS IAM account permissions:

  • sqs:DeleteMessage
  • sqs:GetQueueUrl
  • sqs:ListQueues

Cross-account permissions don't apply to this action. For more information, see Basic Examples of Amazon SQS Policies in the Amazon SQS Developer Guide.

Create an Amazon SQS Delete Messages activity

An instance of an Amazon SQS Delete Messages activity is created from an Amazon SQS connection using its Delete Messages activity type.

To create an instance of an activity, drag the activity type to the design canvas or copy the activity type and paste it on the design canvas. For details, see Creating an activity instance in Component reuse.

An existing Amazon SQS Delete Messages activity can be edited from these locations:

Configure an Amazon SQS Delete Messages activity

Follow these steps to configure an Amazon SQS Delete Messages activity:

Step 1: Enter a name, select a queue, and specify settings

In this step, provide a name for the activity, select a queue, and specify the receipt handle for the message to delete.

Amazon SQS Delete Messages activity configuration step 1

Tip

Fields with a variable icon Variable icon support using global variables, project variables, and Jitterbit variables. Begin either by typing an open square bracket [ into the field or by clicking the variable icon to display a list of the existing variables to choose from.

  • Name: Enter a name to identify the activity. The name must be unique for each Amazon SQS Delete Messages activity and must not contain forward slashes (/) or colons (:).

  • Select a Queue: This section displays queues available in the Amazon SQS endpoint. When reopening an existing activity configuration, only the selected queue is displayed instead of reloading the entire queue list.

    • Selected Queue: After a queue is selected, it is listed here.

    • Search: Enter any column's value into the search box to filter the list of queues. The search is not case-sensitive. If queues are already displayed within the table, the table results are filtered in real time with each keystroke. To reload queues from the endpoint when searching, enter search criteria and then refresh, as described below.

    • Refresh: Click the refresh icon Refresh icon or the word Refresh to reload queues from the Amazon SQS endpoint. This may be useful if queues have been added to Amazon SQS. This action refreshes all metadata used to build the table of queues displayed in the configuration.

    • Selecting a Queue: Within the table, click anywhere on a row to select a queue. Only one queue can be selected. The information available for each queue is fetched from the Amazon SQS endpoint:

      • Name: The queue name from Amazon SQS.

      • Description: The queue description from Amazon SQS.

    Tip

    If the table does not populate with available queues, the Amazon SQS connection may not be successful. Ensure you are connected by reopening the connection and retesting the credentials.

  • Receipt Handler: Enter the receipt handle associated with the message to delete. A new receipt handle is returned every time a message is received.

  • Continue on Error: Select to continue the activity execution if an error is encountered for a dataset in a batch request. If any errors are encountered, they are written to the operation log. It is selected by default.

  • Save & Exit: If enabled, click to save the configuration for this step and close the activity configuration.

  • Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.

  • Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.

Step 2: Review the data schemas

Any request or response schemas generated from the endpoint are displayed.

Amazon SQS Delete Messages activity configuration step 2

  • Data Schemas: These data schemas are inherited by adjacent transformations and are displayed again during transformation mapping.

    Note

    Data supplied in a transformation takes precedence over the activity configuration.

    The Amazon SQS connector uses the AWS SDK for Java version 1.12.522. Refer to the API documentation for information on the schema nodes and fields.

    The request and response data schemas consist of these nodes and fields:

    • Request:

      Request Schema Node/Field Amazon SQS API Field/Method Description
      deleteMessagesRequest DeleteMessageRequest Request to delete messages from a queue
      request N/A (Request Node) Node representing the request
      queueUrl QueueUrl String with the URL of the queue to delete a message from
      receiptHandler ReceiptHandle String with the receipt handle associated with the message to delete
    • Response:

      Response Schema Node/Field Amazon SQS API Field/Method Description
      deleteMessagesResponse DeleteMessageResponse Response from deleting messages from a queue
      response N/A (Response Node) Node representing the response
      status N/A (Response Status Code) String set to the response's status
      message N/A (Response Message) String set to the response's message body

    Note

    Refer to the DeleteMessage action for detailed information on the schema nodes and fields.

  • Refresh: Click the refresh icon Refresh icon or the word Refresh to regenerate schemas from the Amazon SQS endpoint. This action also regenerates a schema in other locations throughout the project where the same schema is referenced, such as in an adjacent transformation.

  • Back: Click to temporarily store the configuration for this step and return to the previous step.

  • Finished: Click to save the configuration for all steps and close the activity configuration.

  • Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.

Next steps

After configuring an Amazon SQS Delete Messages activity, complete the configuration of the operation by adding and configuring other activities, transformations, or scripts as operation steps. You can also configure the operation settings, which include the ability to chain operations together that are in the same or different workflows.

Menu actions for an activity are accessible from the project pane and the design canvas. For details, see Activity actions menu in Connector basics.

Amazon SQS Delete Messages activities can be used as a target with these operation patterns:

To use the activity with scripting functions, write the data to a temporary location and then use that temporary location in the scripting function.

When ready, deploy and run the operation and validate behavior by checking the operation logs.