Amazon AWS extension
Plugin ID
The plugin ID for Apache ActiveMQ is fr.cantor.c4i.AWSDelivery
.
Important note : For now, c4i is only able to produce JSON messages.
Properties
Property key | Description | Mandatory | Default value |
---|---|---|---|
debug | true to display debug log | No | false |
queueOwnerAwsAccountId | ID of the AWS account | Yes | |
service | SQS or SNS | Yes | |
region | The region where the SQS/SNS queues are defined | Yes | |
accessKey | AWS Access Key | Yes | |
secretKey | AWS Secret Key only in Standalone mode | Yes | |
configAssetId | The ID of the asset containing the YAML mappings | Yes | |
prefixQueueNamesWithContextId | true or false to indicate whether or not to prefix the queue names with the context IDs | Yes | |
batchMessages | true will send message batches using the SendMessageBatch query, false will send each message with the SendMessage query | Yes | |
messageGroupId | The Message Group ID that will be used for every message | Only for fifo queues | |
useIdAsDeduplicationId | true will send the message ID as deduplication ID. See below | Yes | |
delay | Message delay. -1 to ignore | No | -1 |
cacheConfig | The ID of the asset containing the JCS configuration | No | |
target.arn.{queueName} | Only used for SNS. The ARN of the target queues | No |
Configuration example
extensions.[0].pluginId=fr.cantor.c4i.AWSDelivery
extensions.[0].target=SQS
extensions.[0].configAssetId=C4I-Configuration
extensions.[0].queueOwnerAwsAccountId=4338511992662
extensions.[0].region=us-east-1
extensions.[0].accessKey=AKIAZRH4PHFLLQB4CMO6
extensions.[0].prefixQueueNamesWithContextId=true
extensions.[0].batchMessages=true
extensions.[0].useIdAsDeduplicationId=false
pluginId=fr.cantor.c4i.AWSDelivery
extensions.[0].target=SQS
configAssetId=C4I-Configuration
queueOwnerAwsAccountId=4338511992662
region=us-east-1
accessKey=AKIAZRH4PHFLLQB4CMO6
secretKey=secure_secret_key
prefixQueueNamesWithContextId=true
batchMessages=true
useIdAsDeduplicationId=false
cacheConfig=/Path/to/JCS/Config.ccf
pluginId=fr.cantor.c4i.AWSDelivery
target=SNS
configAssetId=C4I-Configuration
queueOwnerAwsAccountId=4338511992662
region=us-east-1
accessKey=AKIAZRH4PHFLLQB4CMO6
secretKey=secure_secret_key
prefixQueueNamesWithContextId=true
batchMessages=true
useIdAsDeduplicationId=false
cacheConfig=/Path/to/JCS/Config.ccf
target.arn.product=arn:aws:sns:us-east-1:574008783416:product_dev
target.arn.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"
}