AmazonSQS Inbound Endpoint Reference

The following configurations allow you to configure AmazonSQS Inbound Endpoint for your scenario.

Parameter Description Required Possible Values Default Value
waitTime The time to wait when polling queues for messages. By default, there is no wait (short polling). Setting the waitTime up to 20 seconds (the maximum wait time) creates long polling. No 0 - 20 0
destination URL of the Amazon SQS Queue from which you want to consume messages. Yes N/A N/A
secretKey The secret key used to sign requests (a 40-character sequence). Yes N/A N/A
accessKey The access key that corresponds to the secret key that you used to sign the request (a 20-character sequence). Yes N/A N/A
maxNoOfMessage Maximum number of messages to return. Amazon SQS never returns more messages than this value but might return fewer. Not necessarily all the messages in the queue are returned. No 1-10 1
attributeNames A comma-separated list of attributes you want to return along with the received message. No N/A N/A
contentType Content type of the message No text/plain
application/json
application/xml
text/plain
autoRemoveMessage Check whether the message need to be deleted or not from the queue. If you set this parameter as false, in any cases the message will be in the queue until message retention period of time. No true
false
true
SET_ROLLBACK_ONLY In the failure scenario, the mediation flow is going to the fault sequence which is specified in the configuration. If a failure occurs, the fault sequence if you have set "SET_ROLLBACK_ONLY" property as "true" the message will roll back to the Amazon SQS queue.
No property name="SET_ROLLBACK_ONLY" value="true" -

SET_ROLLBACK_ONLY Property

If a failure occurs, the Amazon SQS message will roll back. In the following property is set to true in the fault handler, in order to roll back the Amazon SQS queue messages when a failure occurs.

<property name="SET_ROLLBACK_ONLY" value="true"/>

??? note "Sample fault sequence"

<?xml version="1.0" encoding="UTF-8"?>
<sequence name="fault" xmlns="http://ws.apache.org/ns/synapse">
    <property name="SET_ROLLBACK_ONLY" value="true"/>
    <log level="custom">
        <property name="Transaction Action" value="Rollbacked"/>
    </log>
    <log level="full">
        <property name="MESSAGE" value="Executing default 'fault' sequence"/>
        <property expression="get-property('ERROR_CODE')"
            name="ERROR_CODE" xmlns:ns="http://org.apache.synapse/xsd"/>
        <property expression="get-property('ERROR_MESSAGE')"
            name="ERROR_MESSAGE" xmlns:ns="http://org.apache.synapse/xsd"/>
    </log>
    <drop/>
</sequence>

Top