Connect service integration buses to use publish/subscribe messaging
We can connect a service integration bus to another service integration bus to send and receive messages using publish/subscribe messaging. To do this, we create a foreign bus connection.
To connect a service integration bus to another service integration bus to use publish/subscribe messaging, the following resources must exist:
- A service integration bus to connect from, known as the local bus. The bus must have at least one bus member.
- A service integration bus to connect to, known as the foreign bus. The bus must have at least one bus member.
- A topic space on both service integration buses. If the foreign bus is in a remote cell, we must know the topic space name.
- Optionally, to configure a secure connection, an authentication alias.
The buses that you connect must have unique names, because the connection will fail if the buses have the same name.
In publish/subscribe messaging, the sending application publishes messages to an intermediate broker destination. Multiple receiving applications can subscribe to this destination to receive a copy of any messages that are published. When a message arrives at a destination, the messaging provider distributes a copy of the message to all the receiving applications that subscribe to the destination. There can be a one-to-many relationship between the sender and receiver of a message, depending on how many receiving applications are subscribed to a destination when a message arrives.
Tasks
- In the navigation pane, click Service integration -> Buses. A list of service integration buses is displayed.
- In the Buses pane, click the service integration bus to connect from, that is, the local bus.
- In the configuration tab, under Topology, click Foreign bus connections.
- In the Foreign bus connections pane, click New to start the Foreign bus connection wizard.
- In the Bus connection type pane, ensure that Direct connection is selected.
- In the Foreign bus type pane, ensure that Service integration bus is selected.
- In the Local bus details pane, select from the drop-down list the messaging engine to use.
- Optionally, enter a name for the inbound user ID. When the local bus is secure, the inbound user ID replaces the user ID in messages from the foreign bus that arrive at the local bus and is used to authorize whether those messages can access their destinations. Specify an inbound user ID for the local service integration bus under the following circumstances:
- The foreign bus is in a different security domain, so user IDs in the foreign bus are not recognized in the local bus.
- You want local control of access to inbound messages to the local bus.
If the local bus is not secure, the inbound user ID has no effect on messages. If the local bus is secure, the foreign bus is not secure, and an inbound user ID is not set, an inbound message from the foreign bus is only authorized to destinations that allow unauthenticated users access.
- In the Foreign bus details pane, complete the details as appropriate:
- If the service integration bus we want to connect to is in a different cell from the local bus, complete the following details:
- Ensure that Configure a foreign bus in a remote cell is selected.
- Enter the name of the service integration bus to connect to, that is, the foreign bus. Enter the exact name of the existing service integration bus.
- Enter the name of the gateway messaging engine in the foreign bus, that is, the messaging engine to connect to in the foreign bus.
- Select the Configure publish-subscribe messaging for this connection check box.
- Enter the name of the service integration bus link.
- Enter one or more bootstrap endpoints, that is, the host, port location, and transport chain for the messaging engine on the foreign bus that the local service integration bus connects to. The port is the SIB_ENDPOINT_ADDRESS (or SIB_ENDPOINT_SECURE_ADDRESS if security is enabled) of the messaging engine. Use the format hostName:portNumber:chainName, separating each bootstrap endpoint by a comma. See steps relating to setting bootstrap endpoints in Configure a connection to a non-default bootstrap server.
- If the service integration bus we want to connect to is in the same cell as the local bus, complete the following details:
- Ensure that Configure a foreign bus in a local cell is selected.
- Select the name of the service integration bus to connect to, that is, the foreign bus.
- Select the name of the gateway messaging engine in the foreign bus, that is, the messaging engine to connect to in the foreign bus.
- Select the Configure publish-subscribe messaging for this connection check box.
- Enter the name of the service integration bus link.
- Optionally, to secure the connection, in the Foreign bus details pane, complete the following details:
- Select the Secure connection check box.
- Select the type of transport chain to use to communicate with the messaging engine in the foreign bus. Select one of the following:
- InboundBasicMessaging. InboundBasicMessaging is a predefined transport chain where communication uses the TCP protocol.
- InboundSecureMessaging. InboundSecureMessaging is a predefined transport chain where communication is secured using the secure sockets layer (SSL) based encryption protocol over a TCP network. For successful connection, a set of suitably compatible SSL credentials must be associated with the local bus inbound channel and the foreign bus outbound channel.
- Other, please specify. Select this option to specify our own transport chain and enter the details in the field that appears.
- Select the name of the authentication alias to use to authenticate access to the foreign bus. The alias must be known to the foreign bus.
- In the Publish-subscribe details pane, repeat the following steps for each topic mapping we want to create:
- Select the name of the topic space on the local bus that will map to the topic space on the foreign bus.
- Enter the name of the topic space on the foreign bus. If the foreign bus is in the same cell as the local bus, we can select this name from a drop-down list.
- Click Add.
- When the Foreign bus connection wizard is finished, save our changes to the master configuration.
We have created a connection from a local service integration bus to a foreign service integration bus to use publish/subscribe messaging. We have created a direct foreign bus connection, which contains a routing definition, or virtual link. The physical link, a service integration bus link on the messaging engine for the local bus, is created automatically.
What to do next
We must create a connection in the opposite direction between the two buses. To do this, repeat the procedure, using the bus we have just connected to as the local bus, and the bus we have just connected from as the foreign bus. Ensure that we use exactly the same name for the service integration bus link. After creating a foreign bus connection for each service integration bus, we can test the connection.
Related:
Inbound transport options Create topic space mappings Connect buses using an indirect connection Testing foreign bus connections List the foreign bus connections Remove a foreign bus connection from a bus Configure destination defaults for a foreign bus connection