ActiveMQ extension
Plugin ID
The plugin ID for Apache ActiveMQ is fr.cantor.c4i.ActiveMQDelivery.
This plugin supports both ActiveMQ 5 and ActiveMQ Artemis.
Properties
Environment independent parameters (set in extension configuration or properties file)
| Property key | Description | Mandatory | Default value |
|---|---|---|---|
| configAssetId | The ID of the asset containing the YAML mappings | Yes | |
| connection | The name of the connection in the c4i.properties file | Yes | |
| prefixDestinationNamesWithContextId | true or false to indicate whether or not to prefix the topics/queues names with the context IDs | Yes | |
| cacheConfig | The ID of the asset containing the JCS configuration | No | |
| displayPerfStat | true to display performance statistics (see Performance statistics dedicated page) | No | false |
Environment dependent parameters (set in centralized c4i.properties file)
| Property key | Description | Mandatory | Default value |
|---|---|---|---|
| brokerUrl | URL of the ActiveMQ broker | Yes | |
| username | The username to connect to the ActiveMQ broker | No | |
| password | The password to connect to the ActiveMQ broker | No |
Configuration example
Topics vs Queues
By default, c4i will publish data to topics. If you want to publish data to a queue, the mapping target name must start with "queue://".
Complex key handling
A key is not required for the produced messages.
However, if one is supplied, the following must be taken into consideration :
A "simple" key (made of a single mapping) will simply be mapped into the target document, as any other mapping.
Example :
- Product:
products[id]:
- ./@ID: id
- ./@UserTypeID: objectType
- Name/text(): nameWill produce the following JSON document :
{
"id": "PRD1",
"objectType": "PRD",
"name": "Exemple product"
}A "complex key" (made of two or more mappings) will be added into the target document as a sub-document, under key id.
Example :
- Product:
products[id, objectType]:
- ./@ID: id
- ./@UserTypeID: objectType
- Name/text(): nameWill produce the following JSON document :
{
"id": {
"id": "PRD1",
"objectType": "PRD"
},
"name": "Exemple product"
}