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

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

A single broker topology

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

Image showing two applications communicating via 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 executing on separate machines, then either one or the other will have to make remote network connections to communicate with the messaging broker. In this situation, it may be desirable 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 via 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. Provided the home broker is active, the application will be able to process the messages queued for it using the local network connection.

However, since each applications needs to send messages to the other's queue, they both need connections to the remote broker. This has two 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 will be 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 via 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 wants to send a message to app2 it sends a message to saf:queue2 using its home broker connecion. Once 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 will flow from the store-and-forward queue to the target queue.

Version 1.1.0.0.21442