Store-and-forward queue

This type of queue is normally defined on a server and can be configured in the following ways:

Store-and-forward queues are implemented by the MQeStoreAndForwardQueue class. They are managed with the MQeStoreAndForwardQueueAdminMsg class, which is a subclass of MQeRemoteQueueAdminMsg. The main addition in the subclass is the ability to add and remove the names of queue managers for which the store-and-forward queue can hold messages.

Apart from the characteristics shared by all remote queues, a store-and-forward queue object also has a property identifying its set of target queue managers. The string field Queue_QMgrNameList, with the value "qqmnl", identifies the field in an administration message representing the set of target queue managers. The value of this field is set or retrieved using putAsciiArray() and getAsciiArray() methods.

Figure 34. Store-and-forward queue

top

Each store-and-forward queue has to be configured to handle messages for any queue managers for which it can hold messages. Use the Action_AddQueueManager action, described earlier in this section, to add the queue manager information to each queue.

If you want the store-and-forward queue to push messages to the next queue manager, the queue manager name attribute of the store-and-forward queue must be the name of the next queue manager. A connection with the same name as the next queue manager must also be configured. The store-and-forward queue uses this connection as the transport mechanism for pushing messages to the next hop.

If you want the store-and-forward queue to wait for messages to be collected or pulled, the queue manager name attribute of the store-and-forward queue has no meaning , but it must still be configured. The only restriction on the queue manager attribute of the queue name is that there must not be a connection with the same name. If there is such a connection, the queue tries use the connection to forward messages.

Figure 34 shows an example of two store and forward queues on different queue managers, one setup to push messages to the next queue manager, the other setup to wait for messages to be collected:

If a queue manager wants to send a message to another queue manager using a store-and-forward queue on an intermediate queue manager, the initiating queue manager must have:

When these conditions are fulfilled, an application can put a message to the target queue on the target queue manager without having any knowledge of the layout of the queue manager network. This means that changes to the underlying queue manager network do not affect application programs.

In Figure 34 queue manager qm1 has been configured to allow messages to be put to queue invQ on queue manager qma. The configuration consists of:

If an application program uses queue manager qm1 to put a message to queue invQ on queue manager qma the message flows as follows:

  1. The application puts the message to asynchronous queue qma.invQ. The message is stored locally on qm1 it is transmitted.
  2. When transmission rules allow, the message is moved. Based on the connection definition for qma, the message is routed to queue manager qm2
  3. The only queue configured to handle messages for queue invQ on queue manager qma is store-and-forward queue qm3.SFQ on qm2. The message is temporarily stored in this queue
  4. The stored and forward queue has a connection that allows it to push messages to its next hop which is queue manager qm3
  5. Queue manager qm3 has a store-and-forward queue qm3.SFQ that can hold messages destined for queue manager qma so the message is stored on that queue
  6. Messages for qma remain on the store-and-forward queue until they are collected by queue manager qma. See Administering home server queues for how to set this up.


© IBM Corporation 2002. All Rights Reserved