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 39. Store-and-forward queue
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 39 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 39 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: