Receive Message

Operation Name

Receive Message

Function Overview

Receive messages from Amazon SQS.

Data Model

XML type.

Properties

For details on use of variables, refer to “Variables”.
Basic settings
Item name Required/Optional Use of variables Description Remarks
Name Required Not available Enter the name to show on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
Destination Required Not available Select a global resource.
  • [Add]:
    Add a new global resource.
  • [Edit list]:
    Global resource settings can be edited in “Edit resource list” screen.
 
Queue name Required Available Specify a queue to receive messages from.
  • Enter directly or select from the list.
 
Option
Item name Required/Optional Use of variables Description Remarks
Maximum number of messages to receive Optional Available Specify the maximum number of messages to receive from Amazon SQS.
  • Specify between 1-10.
  • When omitted, the setting of Amazon SQS will be reflected.
Visibility timeout (seconds) for receiving message Optional Available Specify the time (seconds) in which received messages will be invisible.
  • Specify between 0-43200.
  • When omitted, the setting of Amazon SQS will be reflected.
Comment
Item name Required/Optional Use of variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input schema

None.

Output schema

<?xml version="1.0"?>
<message_results>
  <message_result md5_message_body="" message_body="" message_id=""  receipt_handle="" >
    <attribute approximate_first_receive_timestamp="" receive_count="" sender_id="" sent_timestamp="" />
  </message_result>
</message_results>
Element name Attribute name Description Remarks
message_results -    
message_result - Appears for each sent message.  
md5_message_body Value of the message body encoded with MD5.
  • Value of “MD5OfMessageBody” element included in the response from Amazon SQS.
message_body Value of the message body.
  • Value of “MessageBody” element included in the response from Amazon SQS.
message_id Message ID of the received data.
  • Value of “MessageId” element included in the response from Amazon SQS.
receipt_handle The identifier (Receipt Handle) used in message deletion request.
  • Value of “ReceiptHandle” element included in the response from Amazon SQS.
attribute The element that contains message attribute.
  • Value of “Attributes” element included in the response from Amazon SQS.
attribute - Appears for each message_result element.  
approximate_first_receive_timestamp The timestamp of when received the message for the first time.
  • Represented in the UNIX Time format.
receive_count The number of times of receiving the messages.
  • When the message is received for the first time, the value will be [1].
sender_id The message sender ID.  
sent_timestamp The timestamp of when sent the message.
  • Represented in the UNIX Time format.

Loading schema in Mapper

Schema is loaded automatically.
Refer to “Edit Schema” for more details.

Mass Data Processing

Mass data processing is not supported.

PSP Usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
count The number of the received messages is stored.
  • Default value is null.
message_category When an error occurs, the corresponding message code's category is stored.
  • Default value is null.
message_code When an error occurs, the corresponding message code is stored.
  • Default value is null.
message_level When an error occurs, the corresponding message code's severity is stored.
  • Default value is null.
error_type When an error occurs, the error type is stored.
  • Default value is null.
  • The error type will be in the following format.
    Example: “java.io.FileNotFoundException”
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_message When an error occurs, the error message is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_trace When an error occurs, the error's trace information is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions and client applications.

Specification Limits

None.

Major Exceptions

Exception name Cause Solution
ResourceNotFoundException
Resource definition is not found. Name: []
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource definition is not found. Name: [<global resource name>]
The resource definition selected in [Destination] is not found. Check the global resource specified in [Destination].
InvalidPropertyConfigurationException
Specify an integer between 1 and 10 for the maximum number of receiving messages.
[Maximum number of receiving messages] is not an integer or is out of available range. Specify an integer between 1 and 10 for [Maximum number of receiving messages].
InvalidPropertyConfigurationException
Specify an integer between 0 and 43200 for the visibility timeout (seconds) of receiving messages
[Visibility timeout (seconds) of receiving message] is not an integer or is out of available range. Specify an integer between 0 and 43200 in [Visibility timeout (seconds) of receiving messages].
The specified queue does not exist for this wsdl version. (Service: AmazonSQS; Status Code: 400; Error Code: AWS.SimpleQueueService.NonExistentQueue; Request ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) A queue which does not exist is specified in [Queue name]. Check [Queue name], or [Region] setting of the global resource specified in [Destination].
The security token included in the request is invalid. (Service: AmazonSQS; Status Code: 403; Error Code: InvalidClientTokenId; Request ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) There is something wrong with [Access Key ID] of the global resource specified in [Destination]. Check the settings of the global resource specified in [Destination].
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. There is something wrong with [Secret Access Key] of the specified global resource in [Destination]. Check the settings of the global resource specified in [Destination].

Notes