Configuring destination mapping rules
To send messages between Eclipse Amlen and IBM® MQ, you must create destination mapping rules. Destination mapping rules are created by associating an Eclipse Amlen topic or queue with a IBM MQ topic or queue. You can create a maximum of 64 destination mapping rules.
Destination mapping rules specify a source topic string or queue name, and define the target topic string or queue. Any message that is published to the source topic, or sent to the source queue, is republished to the target topic, or sent to the target queue. For rules that use topic subtrees, all messages that are published to the topic subtree are either routed to a single queue, are republished to a single topic, or are republished to a reprefixed topic.
Transitive rules are not supported. That is, you must not create a set of destination mapping rules that route messages from IBM MQ to Eclipse Amlen and then back to IBM MQ. You must not create a set of destination mapping rules that route messages from Eclipse Amlen to IBM MQ and then back to Eclipse Amlen. Messages that are sent by using transitive rules loop between the rules infinitely. Therefore, any messages that are sent by using these rules never reach their destination.
- Name
- Specifies a label that identifies the destination mapping rule.
- Queue manager connection
- Specifies one or more queue manager connections to apply the destination mapping rule to.
-
- Enabled
- Specifies whether the destination mapping rule is enabled (true) or disabled (false).
- Rule type
- Specifies the type of source and destination to be used in the rule.
The rule type can be any value that is detailed in the following table:
Table 1. The first column details the valid rule types, the second column details the rule source, and the third column details the rule destination. Rule type From: To: 1 Eclipse Amlen topic IBM MQ queue 2 Eclipse Amlen topic IBM MQ topic 3 Eclipse Amlen queue IBM MQ topic 4 Eclipse Amlen topic IBM MQ topic 5 Eclipse Amlen topic subtree IBM MQ queue 6 Eclipse Amlen topic subtree IBM MQ topic 7 IBM MQ topic subtree Eclipse Amlen topic subtree 8 IBM MQ topic subtree Eclipse Amlen topic 9 IBM MQ topic subtree Eclipse Amlen topic subtree 10 Eclipse Amlen queue IBM MQ queue 11 Eclipse Amlen queue IBM MQ topic 12 Eclipse Amlen queue IBM MQ queue 13 Eclipse Amlen topic IBM MQ queue 14 Eclipse Amlen topic subtree IBM MQ queue Note: With rule type 9, a mapping that results in an Eclipse Amlen topic string with more than 32 levels cannot be mapped correctly because Eclipse Amlen has a maximum topic level of 32. In cases where the level limit is exceeded, the messages are handled as follows:- For non-persistent messages, the message is discarded.
- For persistent messages, the message is retained in a loop between IBM MQ and Eclipse Amlen. In this instance, no further messages can be sent on the affected rule until the looped message is removed from the queue manager.
- Source
- Specifies the topic string, or queue name, that the destination mapping rule maps from.
- Destination
- Specifies the topic string, or queue name, that the destination mapping rule maps to.
- Maximum Messages
- Specifies the maximum number of messages that can be buffered for a destination mapping rule. If the maximum number of messages is reached, messages cannot be published to the Eclipse Amlen topic in the destination mapping rule until the backlog of messages is reduced.
- Retained Messages
- Specifies which messages are forwarded to a topic as retained messages. By default, after a message is published to a topic and is received by the subscribers, the message is discarded. Setting this parameter ensures that a copy of the message is retained, so that it is sent to future subscribers of the topic.
For more information about configuring destination mapping rules by using the Amlen WebUI, see Configuring destination mapping rules by using the Amlen WebUI.
For more information about configuring destination mapping rules by using REST Administration APIs, see Configuring destination mapping rules by using REST Administration APIs.
The following table shows example mappings of source topic strings and queues to target topic strings and queues:
Rule type | Source | Destination | Explanation |
---|---|---|---|
1 | Eclipse Amlen
topic:
|
IBM MQ
queue:
|
A message that is published to the Eclipse Amlen
topic IMARoot/Level1 is MQPUT to the IBM MQ queue MQ.QUEUE1 |
2 | Eclipse Amlen
topic:
|
IBM MQ
topic:
|
A message that is published to the Eclipse Amlen
topic IMARoot/L1/Subject1 is republished to the IBM MQ topic MQRoot/L1/Target
|
3 | IBM MQ
queue:
|
Eclipse Amlen
topic:
|
A message that is sent to the IBM MQ queue
MQ.QUEUE1 is published to the Eclipse Amlen
topic IMARoot/L1 |
4 | IBM MQ
topic:
|
Eclipse Amlen
topic:
|
A message that is published to the IBM MQ
topic MQRoot/L1/Subject is republished to the Eclipse Amlen topic IMARoot/L1/Target
|
5 | Eclipse Amlen topic subtree:
|
IBM MQ queue:
|
A message that is published to any Eclipse Amlen
topic that starts with IMARoot/L1 is MQPUT to the IBM MQ queue MQ.QUEUE1
For example, a message that is published to the Eclipse Amlen topic IMARoot/L1/Subject is MQPUT
to the IBM MQ queue
MQ.QUEUE1 |
6 | Eclipse Amlen topic subtree:
|
IBM MQ topic:
|
Using a topic subtree is equivalent to using a wildcard. That is, the subtree of
IMARoot/L1 , is the same as IMARoot/L1/+ or
IMARoot/L1/# . Therefore, any message that is published to any Eclipse Amlen topic that starts with IMARoot/L1
is republished to a IBM MQ topic
MQRoot/L1/Target For example, messages that are published to the Eclipse Amlen topics IMARoot/L1/Subject1 ,
andIMARoot/L1/Subject2 are sent to the IBM MQ topicMQRoot/L1/Target |
7 | Eclipse Amlen topic subtree:
|
IBM MQ topic subtree:
|
Using a topic subtree is equivalent to using a wildcard. That is, the subtree of
IMARoot/L1 , is the same as IMARoot/L1/+ or
IMARoot/L1/# . Therefore, any message that is published to any Eclipse Amlen topic that starts with IMARoot/L1
is republished to a IBM MQ topic with the same basic
topic string, but a different prefix. The prefix is defined by the destination topic string
specified. For example, a message that is published to the Eclipse Amlen topic IMARoot/L1/Subject1 is
republished to the IBM MQ topic
MQRoot/L1/L2/Subject1 For example, a message that is published to the
Eclipse Amlen topic IMARoot/L1/Subject2/A is
republished to the IBM MQ topic
MQRoot/L1/L2/Subject2/A |
8 | IBM MQ topic subtree:
|
Eclipse Amlen topic:
|
Using a topic subtree is equivalent to using a wildcard. That is, the subtree of
MQRoot/L1 , is the same as MQRoot/L1/+ or
MQRoot/L1/# . Therefore, any message that is published to any IBM MQ topic string that starts with
MQRoot/L1 is republished to anEclipse Amlen
topic IMARoot/L1/Target For example, messages that are published to the
IBM MQ topics MQRoot/L1/Subject1 ,
andMQRoot/L1/Subject2 are sent to the Eclipse Amlen topicIMARoot/L1/Target |
9 | IBM MQ topic
subtree:
|
Eclipse Amlen topic subtree:
|
Using a topic subtree is equivalent to using a wildcard. That is, the subtree of
MQRoot/L1 , is the same as MQRoot/L1/+ or
MQRoot/L1/# . Therefore, any message that is published to any IBM MQ topic that starts with MQRoot/L1
is republished to an Eclipse Amlen topic with the same basic
topic string, but a different prefix. The prefix is defined by the destination topic string
specified. For example, a message that is published to the IBM MQ topic MQRoot/L1/Subject1 is
republished to the Eclipse Amlen topic
IMARoot/L1/Subject1 A message that is published to the IBM MQ topic MQRoot/L1/Subject2/A is
republished to the Eclipse Amlen topic
IMARoot/L1/Subject2/A |
10 | Eclipse Amlen
queue:
|
IBM MQ
queue:
|
A message that is sent to the Eclipse Amlen queue
IMA.QUEUE1 is MQPUT to the IBM MQ
queue MQ.QUEUE1 |
11 | Eclipse Amlen
queue:
|
IBM MQ
topic:
|
A message that is sent to the Eclipse Amlen queue
IMA.QUEUE1 is published to the IBM MQ
topic MQRoot/L1/Target |
12 | Eclipse Amlen
queue:
|
Eclipse Amlen
queue:
|
A message that is sent to the IBM MQ queue
MQ.QUEUE1 is forwarded to the Eclipse Amlen
queue IMA.QUEUE1 |
13 | IBM MQ
topic:
|
Eclipse Amlen
queue:
|
A message that is published to the IBM MQ
topic MQRoot/L1/Subject is sent to the Eclipse Amlen queue IMA.QUEUE1 |
14 | IBM MQ topic
subtree:
|
Eclipse Amlen
queue:
|
A message that is published to any IBM MQ
topic that starts with MQRoot/L1 is sent to the Eclipse Amlen queue IMA.QUEUE1 For
example, messages that are published to the IBM MQ
topics MQRoot/L1/Subject1 , andMQRoot/L1/Subject2 are sent to the
Eclipse Amlen queue IMA.QUEUE1 |