Access Keys:
Skip to content (Access Key - 0)
community header community tab mule tab galaxy tab muleforge tab

Amazon SQS Connector

Amazon Simple Queue Service (SQS) is a reliable, scalable, hosted queueing solution accessible via REST and SOAP based Web Services.  Obviously queue security and management must be done outside of this connector.

The maxim message size is 8kb for the 2008-01-01 SQS WSDL, but 256kb for 2007-05-01 SQS WSDL. Please note that Amazon will deprecate the 2007-05-01 WSDL on May 6, 2009.

* Note: You must have an Amazon AWS account to use SQS. 

Status

Version 1.0 has been released and can be downloaded here: http://dist.muleforge.org/sqs-transport/ 
Version 2.0 for Mule 2.1.1 has been checked into the SVN tags directory.

Dependencies

This connector relies on a library called typica. The latest version of Typica is 1.4.1, and supports the 2008-01-01 WSDL. Release 1.0 depends on Typica .9.

Features

  • Endpoint queues created if they don't exist.
  • Secure SSL connectivity via REST Web Service interface.
  • 8kb message size limit.
  • Ability to use Mule compression transformers to reduce message size.
  • Ability to support multiple SQS queues with different credentials.

Future Enhancements

  • Ability to have unlimited message size by using S3 and SQS pointers.
  • Full transactional support.

Usage For Version 2.0 (Mule 2.1.1)

Namespace declaration:

Todo

Connector definition:

<sqs:connector name="sqsConnector" awsAccessKey="${amazon.accessKey}" awsSecretKey="${amazon.secretKey}" pollingFrequency="10000">
<sqs:connector name="sqsConnector2" awsAccessKey="${amazon.accessKey}" awsSecretKey="${amazon.secretKey}" pollingFrequency="60000">

Endpoint definition:

<sqs:endpoint name="MY_SQS_QUEUE" path="my_sqs_queue" connector-ref="sqsConnector"/>

Compression help:

The new SQS WSDL definition only allows messages up to 8kb in size. This is a drastic reduction from 256kb from the previous definition. In order to help work around this limitation, you can use the built-in compression transformers to reduce your message size.

<gzip-compress-transformer name="GZipCompress"/>
<gzip-uncompress-transformer name="GZipUncompress"/>
<string-to-byte-array-transformer name="StringToByteArray"/>
<byte-array-to-object-transformer name="ByteArrayToObject"/>
<base64-encoder-transformer name="Base64Encoder"/>
<base64-decoder-transformer name="Base64Decoder"/>

<!-- ENQUEUE -->
<outbound-endpoint ref="MY_SQS_QUEUE" transformer-refs="StringToByteArray GZipCompress Base64Encoder">

<!-- DEQUEUE -->
<inbound-endpoint ref="MY_SQS_QUEUE" transformer-refs="Base64Decoder GZipUncompress ByteArrayToObject"/>

Usage For Version 1.0 (Mule 1.4.x)

Connector definition:

	<connector name="sqs" className="org.mule.providers.sqs.SqsConnector">
		<properties>
			<property name="awsAccessKey" value="${awsAccessKey}" />
			<property name="awsSecretKey" value="${awsSecretKey}" />
		        <property name="pollingFrequency" value="60000" />
		</properties>
	</connector>

Endpoint definition:

<endpoint address="sqs://${queue_name}" />
Adaptavist Theme Builder (3.3.3-conf210) Powered by Atlassian Confluence 2.10, the Enterprise Wiki.
Free theme builder license