Amazon AWS extension

Plugin ID

The plugin ID for Apache ActiveMQ is fr.cantor.c4i.AWSDelivery.

Properties

Environment independent parameters (set in extension configuration or properties file)

Property keyDescriptionMandatoryDefault value
configAssetIdThe ID of the asset containing the YAML mappingsYes
connectionThe name of the connection in the c4i.properties fileYes
prefixQueueNamesWithContextIdtrue or false to indicate whether or not to prefix the queue names with the context IDsYes
serviceSQS, SNS, S3 or KinesisYes
batchMessagestrue will send message batches using the SendMessageBatch query, false will send each message with the SendMessagequeryYes
outputFormatJSON, or XMLYes
useIdAsDeduplicationIdtrue will send the message ID as deduplication ID. See belowNofalse
messageGroupIdThe Message Group ID that will be used for every messageOnly for fifo queues
delayMessage delay. -1 to ignoreNo-1
kinesis.partition.{streamName}Only for Kinesis. Indicates the partition key for each topicOnly for Kinesis
autoCreateTargetsOnly for S3. Automatically create the streams if they don't exist. Otherwise, they must be created manuallyNofalse
cacheConfigThe ID of the asset containing the JCS configurationNo
displayPerfStattrue to display performance statistics (see Performance statistics dedicated page)Nofalse

Environment dependent parameters (set in centralized c4i.properties file)

Property keyDescriptionMandatoryDefault value
accessKeyAWS Access KeyYes
secretKeyAWS Secret Key only in Standalone modeYes
regionThe region where the SQS/SNS queues are definedYes
target.mappings.{targetName}Use this parameter to map targets names to SQS queues URL, SNS topics ARN, S3 bucket name or Kinesis stream nameOnly for SNS

Configuration example

extensions.[0].pluginId=fr.cantor.c4i.AWSDelivery
extensions.[0].configAssetId=C4I-Configuration
extensions.[0].connection=aws
extensions.[0].service=SQS
extensions.[0].format=JSON
extensions.[0].prefixQueueNamesWithContextId=true
extensions.[0].batchMessages=true
extensions.[0].useIdAsDeduplicationId=false
pluginId=fr.cantor.c4i.AWSDelivery
licenseAssetId=/Path/to/C4I/License.cat
configAssetId=C4I-Configuration
connection=aws
service=SQS
format=JSON
prefixQueueNamesWithContextId=true
batchMessages=true
useIdAsDeduplicationId=false
cacheConfig=/Path/to/JCS/Config.ccf
pluginId=fr.cantor.c4i.AWSDelivery
licenseAssetId=/Path/to/C4I/License.cat
configAssetId=/Path/to/C4I/Configuration.yml
connection=aws
service=SNS
format=JSON
prefixQueueNamesWithContextId=true
batchMessages=true
useIdAsDeduplicationId=false
cacheConfig=/Path/to/JCS/Config.ccf
aws.region=us-east-1
aws.accessKey=AKIAZRH4PHFLLQB4CMO6
aws.secretKey=secure_secret_key
aws.target.mappings.product=arn:aws:sns:us-east-1:574008783416:product_dev
aws.target.mappings.asset=arn:aws:sns:us-east-1:574008783416:asset_dev

Message Deduplication ID

Fifo queues that do not use content-based deduplication require messages to contain a Deduplication ID. If the parameter useIdAsDeduplicationId is set to true,

Then the fields identified as the message key will be sent as the Deduplication ID.

  • If only one field is mapped, the Deduplication ID will be this single field value.
  • If multiple fields are mapped, the Deduplication ID will be a serialized JSON document containing the key-values pairs.

Important: These fields will not be part of the produced message. If you wish to add them to the message as well, you will need to map them twice

Example

Given the following XML:

<STEP-ProductInformation ContextID="GL">
    <Product ID="PRD1">
        <Name>Test Product</Name>
    </Product>
</STEP-ProductInformation>

The following example illustrates simple keys:

Product:
  - product[id]:
      - ./@ID: id
      - Name/text(): name
PRD1
{
  "name": "Test Product"
}

The following example illustrates complex keys:

Product:
  - product[id, context]:
      - ./@ID: id
      - c4i:currentContextId(): context
      - Name/text(): name
{"id": "PRD1", "context": "GL"}
{
  "name": "Test Product"
}

The following example illustrates how to include the key in the message:

Product:
  - product[deduplicationId]:
      - ./@ID: deduplicationId
      - ./@ID: id
      - Name/text(): name
PRD1
{
  "id": "PRD1",
  "name": "Test Product"
}
Last Updated: