Amazon SQS Connector Guide > Amazon SQS Connections and Processes > SQS Message Payload
  

SQS Message Payload

The event received by the process is an object with a payload that represents the SQS message data.
Similar to other connectors, the message payload for SQS might be made accessible to the process as a process object of type $any.
For example, if the event target payload has plain text content with attributes, the payload looks similar to the following example:
{
"msg":{
"headers":[
{
"name":"attr1",
"value":"attr1_val"
},
{
"name":"attr2",
"value":"attr2_val"
}
],
"body":"some plain content"
}
}
The event response would be similar to the following example:
<field name="sqsResponse">
<root xmlns="">
<MD5OfBody>fd6fb6b12324123fc8473fc7391cfdb3</MD5OfBody>
<messageId>910aac08-e530-4afd-8f08-3868bd9d321f</messageId>
<delaySeconds>0</delaySeconds>
</root>
</field>
If the target type is XML or JSON and you send an object in the body of the message payload, it appears similar to the following example:
{
"msg":{
"headers":[
{
"name":"attr1",
"value":"attr1_val"
},
{
"name":"attr2",
"value":"attr2_val"
}
],
"body":{
"key":"value"
}
}
}
If the payload is XML, the field name is the element name of the list.
If the payload is JSON, the array does not have a field name as defined by the payload and you can specify an Objectlist Name for the Event Source so that the implicit object field name can be set.