Create or update a destination mapping rule
Purpose
Creates or updates a destination mapping rule. A destination mapping rule maps an Eclipse Amlen topic or queue to a IBM® MQ topic or queue.URI
Use the Eclipse Amlen REST API POST method with the following Eclipse Amlen configuration URI:
http://<admin-endpoint-IP:Port>/ima/v1/configuration/
Object configuration data
Provide DestinationMappingRule object configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:
{
"DestinationMappingRule": {
"<NameOfDestinationMappingRule>": {
"QueueManagerConnection": "string",
"Enabled": true|false,
"RuleType": integer,
"Source": "string",
"Destination": "string",
"MaxMessages": integer,
"RetainedMessages": All|None
}
}
}
Where
- NameOfDestinationMappingRule
- Required.
- QueueManagerConnection
- Specifies the name of one or more queue manager connections. The queue manager connections identify which queue managers the rule maps to. You can specify more than one queue manager connection by using a comma-separated list.
- Enabled: true|false
- Specifies whether the destination mapping rule is enabled (true) or disabled (false).
- RuleType
- Specifies the rule type that you want to use.
- Source
- Specifies the source topic string or queue for the rule.
- Destination
- Specifies the destination topic string or queue for the rule.
- MaxMessages
- Specifies the maximum number of messages that can be buffered for the destination mapping rule.
- RetainedMessages: All|None
- Optional.
Usage Notes®
- You must disable a destination mapping rule before you can make any changes to that rule. After you have edited the rule, you must enable that destination mapping rule in order for the changes to take effect.
- To edit a queue manager connection, all destination mapping rules that use that queue manager connection must be disabled. You do not need to restart the mqconn process in order for any changes to take effect.
Related REST Administration APIs
Example
Creates a destination mapping rule calledexampleRule
by using
cURL::
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"DestinationMappingRule": {
"exampleRule": {
"QueueManagerConnection": "MyQMC",
"RuleType": 1,
"Source": "ISMRoot/Level1",
"Destination": "Queue1",
"MaxMessages": 7000,
"Enabled": true,
"RetainedMessages": All
}
}
}
' \
http://127.0.0.1:9089/ima/v1/configuration/
An
example response to the POST
method:
{
"Version": "v1",
"Code": "CWLNA6011",
"Message": "The requested configuration change has completed successfully."
}