Administration messages

The Java class extends MQeRemoteQueueAdminMsg, which provides most of the MQeHomeServerQueueAdminMsg administration capability for remote queues. This class adds additional actions and constants for managing home server queues.

Home-server queues are implemented by the MQeHomeServerQueue class. They are managed with the MQeHomeServerQueueAdminMsg class, which is a subclass of MQeRemoteQueueAdminMsg. The only addition in the subclass is the Queue_QTimerInterval characteristic. This field is of type int and is set to a millisecond timer interval. If you set this field to a value greater than zero, the home-server queue checks the home server every n milliseconds to check for messages awaiting collection. Any messages that are waiting are delivered to the target queue. A value of 0 for this field means that the home-server is polled only when the MQeQueueManager.triggertransmission method is called.

Note:
If a home-server queue fails to connect to its store-and-forward queue, for example if the store-and-forward queue is unavailable when the home server queue starts, it stops trying until a trigger transmit call is made.

Message transmission

Java

A home server queue can be requested to check for pending messages:

Home-server queues have an important role in enabling devices to receive messages over client-server channels particularly in environments where it is not possible for a server to establish a connection to a device.

For information on basic administration concepts, refer to Administration using administration messages. Also for information on managing queues, that is MQeQueueAdminMsg and MQeRemoteQueueAdminMsg, refer to Administering local queues and Administering remote queues.

C

The C codebase does not have background threads. Therefore, the home server queue only pulls down messages from a store-and-forward queue when mqeQueueManager_triggerTransmission is called. The trigger transmission method only returns when an attempt has been made to transmit all messages.

Creating

Administration message

The home server queue is created in a similar manner to other queues. It is generally recommended not to use a time interval but to control the transmission using triggerTransmission.

C API

Figure 33.

   if (MQERETURN_OK == rc) {
      MQeHomeServerQParms homeServerQParms = HOME_SERVER_Q_INIT_VAL;
 
      rc = mqeAdministrator_HomeServerQueue_create(hAdministrator,
                                                   &exceptBlk,
                                                   hQueueName,
                                                   hServerName,
                                                   &homeServerQParms);

Administration is performed using the following APIs.

mqeAdministration_HomeServerQueue_action()

The MQeHomeServerQParms structure is used to pass parameters. Note that the first element is the MQeRemoteSyncQParms structure. This maps onto the MQeHomeServerQueueAdminMsg inheriting function from the MQeRemoteQueueAdminMsg.

typedef struct MQeHomeServerQParms 
{
   MQeRemoteSyncQParms     remoteQParms;             
/*<Remote Queue Parameters to be filled in  */
   MQEINT64              qTimerInterval;           
/*<Time Interval - for Java compatibility only*/
} MQeHomeServerQParms;


© IBM Corporation 2002. All Rights Reserved