Store-and-forward processing in multiple messaging broker topologies

This topic describes the concept of store-and-forward processing and how it can be used in multiple messaging broker topologies.

Overview

To enable an application to send or receive messages using the IBM® Reliable Transport Extension, the application needs a connection to an active messaging broker for request processing to complete. Depending on the requirements of the scenario, a deployment can use a single messaging broker or multiple messaging brokers.

A single broker topology

Consider the following scenario, in which two applications are communicating using a single messaging broker:

Image showing two applications communicating using a single messaging broker.

In this scenario, app1 is placing a message for app2 on queue2 while app2 is placing a message for app1 on queue1. Both queue1 and queue2 are hosted by a single messaging broker, broker1, so both applications require connection configurations for this broker.

A multiple broker topology

If app1 and app2 are running on separate machines, then either one or the other has to make a remote network connection to communicate with the messaging broker. In this situation, you might want to add a second messaging broker to the topology so each application need only use a local network connection, as in the following diagram:

Image showing two applications communicating using two messaging brokers.

The broker most adjacent to each application is called the home broker. In the diagram, broker1 is the home broker for app1 and broker2 is the home broker for app2.

Each input queue for each application is hosted by the corresponding home broker. So long as the home broker is active, the application can process the messages queued for it using the local network connection.

However, because each application needs to send messages to the queue of the other, they both need connections to the other remote broker. This has the following disadvantages:

  • Each application now requires two separate broker connection configurations; one for its home broker to receive messages and one for the corresponding remote broker to send messages.
  • If the connection to the remote broker is temporarily unavailable, an application is unable to send messages to the other party.

A multiple broker topology with store-and-forward processing

Store-and-forward processing provides an alternative approach when there are multiple brokers in the topology. For example, consider the following diagram:

Image showing two applications communicating using two messaging brokers and store-and-forward processing.

As before, each application has a home broker from which it receives messages. However, this time the applications do not make direct connections to the corresponding remote broker to send a message. Instead, the applications send a message to a special, store-and-forward queue on their home broker.

In the diagram, the store-and-forward queue for queue2 is labelled saf:queue2. When app1 sends a message to app2 it actually sends the message to saf:queue2 using its home broker connection. When the send operation has completed successfully, the delivery of the message to queue2 becomes the responsibility of the broker, broker1. When a connection to broker2 can be established, messages then flow from the store-and-forward queue to the target queue.

Version 1.1.26825