Foreign destinations and alias destinations
Foreign destinations and alias destinations are types of bus destination. A foreign destination represents a destination that is defined in another bus (a foreign bus). An alias destination maps to an alternative name for a bus destination that is defined either in the local bus or in a foreign bus.
- For an application to send messages to a destination that is defined
in the local bus, you specify the bus name and the destination name
in the JMS destination object (queue or topic).
It is possible to omit the bus name, because the default is the local bus name, but for a system with more than one bus, it is advisable to specify the bus name.
- For an application to send messages to a destination that is defined
in a foreign bus, you specify the bus name (that is, the foreign bus)
and the destination name in the JMS destination object (queue or topic).
You do not need to configure any destination objects in the local
bus.
Service integration uses the definition of the foreign bus that is configured on the local bus. This definition includes default values for the destination attributes, such as the default quality of service. These default values apply to all destinations in that foreign bus. For more information, see the topic about point-to-point messaging across multiple buses.
You use a foreign destination when you need to override messaging defaults, security settings, or both for an individual destination on a foreign bus. You define a foreign destination on the local bus. When an application that is connected to the local bus sends messages to the destination in the foreign bus, the attributes of the foreign destination override the destination default values. You can set properties and destination roles, but you cannot map to an alternative name for the destination.
You use an alias destination when you need to use an alternative name for a bus destination. The bus destination can be on the local bus or on a foreign bus. You configure an alias destination on the local bus. When an application in the local bus uses the alias destination, the specified bus name and destination name are mapped to a new name. If you use an alias destination, you can also set properties, destination roles, or both.
When an application that is connected to a bus specifies a destination name and bus name in its JMS destination object (queue or topic) that match the identifier and bus of an alias destination that is defined in that bus, the destination that the application accesses is the same as if the application specified the target identifier and target bus from the alias destination. You can also use a alias destination that is defined in a foreign bus if you need to redirect messages that arrive over a foreign bus connection to differently named destinations or buses, and you cannot modify the configuration of the source bus.
Foreign destinations
外部目的地代表另一個匯流排中所定義的目的地(外部匯流排)。您可以在點對點傳訊使用外部目的地。如果需要置換外部匯流排中個別目的地的安全設定或傳訊預設值,便可使用外部目的地。 外部匯流排可以是另一個服務整合匯流排或 IBM MQ 網路(也就是一或多個交互連接的 IBM MQ 佇列管理程式或佇列共用群組)。
如果要置換外部匯流排中目的地的傳訊預設值,請配置外部目的地的內容(例如,預設優先順序)。如果要置換安全設定和控制本端匯流排中的哪些使用者和群組可以存取外部匯流排中的目的地,請配置外部目的地的目的地角色。當連接到本端匯流排的應用程式將訊息傳送到外部匯流排中的目的地時,適用這些內容。
When you define a foreign destination, use the actual names of the foreign bus and the destination on the foreign bus, so that the JMS destination object does not change.
When an application that is connected to the local bus sends messages to the destination in the foreign bus, service integration in the local bus uses the properties and destination roles of the foreign destination, rather than the default values from the definition of the foreign bus (on the local bus). Typically, you configure the properties of a foreign destination to match the properties that are configured for that destination in the foreign bus (where that destination is a local destination), but this is not essential.
You can also configure destination roles for the foreign destination. Service integration in the local bus uses these roles to control which users and groups in the local bus have access to the destination. It also complements any access controls that the foreign bus applies.
You do not use foreign destinations for publish-subscribe messaging. Instead, applications publish messages locally using a topic space destination in the local bus, and you configure a service integration bus link or a WebSphere MQ link. These links propagate the published messages into the foreign bus, or buses, where subscribers receive the messages. For a link to a service integration bus, configure topic space mappings, as described in Configuring topic space mappings between service integration buses. For a link to a WebSphere MQ network, configure a publish/subscribe bridge, as described in Publish/subscribe messaging through a IBM link.
Service integration cannot use configuration information that is scoped to a foreign bus. Therefore, if an appropriate foreign destination is not defined on the local bus, service integration uses default values for the destination attributes.
Figure 1 shows a JMS application that sends messages from the local bus, Bus 1, to a destination in a foreign bus, Bus 2. Bus 1 has a foreign bus connection defined, which it uses to forward the message to the foreign bus. The foreign destination is not defined in the local bus. Bus 1 gets the destination defaults from the foreign bus connection.

Figure 2 shows a JMS application that sends messages from the local bus, Bus 1, to a destination in a foreign bus, Bus 2. Bus 1 has a foreign bus connection defined, which it uses to forward the message to the foreign bus. Bus 1 includes a foreign destination definition. Bus 1 gets the destination defaults from the foreign destination.

Alias destinations
別名目的地對映匯流排目的地的替代名稱。您可以在點對點傳訊或發佈/訂閱傳訊使用別名目的地。別名目的地將匯流排名稱和目的地名稱 (ID) 對映至不同匯流排名稱或目的地名稱(或兩者)的目標。別名目的地可以對映至佇列目的地或主題空間目的地。必要的話,可以將別名目的地鏈結起來,使目標目的地本身就是別名目的地。
- You need to interoperate with WebSphere MQ, but some service integration
bus names or destination names do not comply with IBM MQ naming restrictions
(for example, the names are too long). You can define an alias destination
that maps a IBM MQ-compliant
name to the service integration name.
For example, an application sends a message to a IBM MQ application and the reply-to destination name does not comply with the IBM MQ naming restrictions. You can define an alias that maps a compliant name to the actual reply-to destination name. The application then specifies the alias destination as the reply-to.
Another example is an application that sends a message through a IBM MQ foreign bus to a remote service integration foreign bus when the send-to destination name does not comply with the IBM MQ naming restrictions. You can define an alias in the remote bus that maps a compliant name to the actual send-to destination name. The application then specifies the alias destination as the send-to. If you want the sending application to use the actual destination name, you can define an alias in the local bus that maps the actual destination name to the compliant name.
- If you move a destination from one bus to another (by deleting
it, then creating it on another bus), you can create an alias destination
that redirects messages from the old destination to the new one. You
must create the alias destination in every bus where applications
reference the destination, for example, the bus that the destination
is moved from, and the bus that the destination is moved to.
However, it might be simpler to change the JMS destinations that are registered with JNDI to point to the new destination.
- 您可以將別名目的地指派給分割佇列目的地的部分佇列點,然後就可以利用別名目的地來限制生產者和消費端應用程式所用的佇列點。
當您使用別名目的地時,也可以設定別名目的地的內容(例如,預設服務品質)。當應用程式使用別名目的地時,這些內容會置換目標目的地的內容。如果您不想置換內容,請配置別名目的地來繼承目標目的地中對應的內容。
當您使用別名目的地時,也可以配置別名目的地的目的地角色。當應用程式使用別名目的地時,本端匯流排中的服務整合會利用這些角色,來控制本端匯流排中哪些使用者和群組有權存取目標目的地。如果您不想置換目標目的地的安全,請配置別名目的地,將授權檢查委派給目標目的地。
Figure 3 shows a JMS application that sends messages from the local bus, Bus 1, to a destination in a foreign bus, Bus 2. Bus 1 has a foreign bus connection defined, which it uses to forward the message to the foreign bus. The JMS destination does not point to the target queue, but points to Bus X, Queue Y. Bus 1 includes an alias destination that maps Bus X, Queue Y to the target destination Bus 2, Queue 2. Bus 1 gets the destination defaults from the alias destination.

Using an alias destination for a destination in a foreign bus
If an application uses an alias destination to access a destination that is defined in a foreign bus, you can configure the alias destination with the specific properties, destination roles, or both that the application requires. This means that you probably do not need to define a foreign destination as well.