Table of Contents
To use HMS, HMS-related settings need to be added to the Tmax environment file.
This chapter describes the HMS-related settings.
To use HMS, DOMAIN, NODE, SVRGROUP, and HMS clauses need to be set.
The following describes how to configure the DOMAIN clause.
*DOMAIN Domain1 [MAXSESSION=numeric]
MAXSESSION = numeric
The size: 1 - 65535
The default value: 1024
Specifies the maximum number of sessions that can be created for HMSs within a domain.
The following describes how to configure the NODE clause.
*NODE Node1 [MAXSESSION=numeric]
MAXSESSION = numeric
The size: 1 - 65535
The default value: 1024
Specifies the maximum number of sessions that can be created for HMSs within a node.
The following describes how to configure the SVRGROUP clause.
*SVRGROUP SVRGROUP Name NODENAME=node-name, SVGTYPE=HMS, HMSNAME=string, OPENINFO=literal, HMSINDEX=numeric, HMSMAXTHR=numeric, HMSMAXDBTHR=numeric, [HMSSUBSCFG=string,] [HMSMSGLIVE=numeric,] [HMSPORT=numeric,] [HMSHEARTBEAT=numeric,] [HMSGQINT=numeric]
SVRGROUP Name = string
The size: No more than 15 characters
Logical name for the HMS server group. It must be a unique name in the SVRGROUP clause.
NODENAME = string
The size: No more than 15 characters
Node in which the HMS server group exists. The NODENAME must be the name of a node defined in the NODE clause.
SVGTYPE = string
Type of the server group. To use HMS, it must be set to HMS.
HMSNAME = string
The size: No more than 15 characters
Name of an HMS process built by a user.
OPENINFO = literal
HMS basically uses a database as a storage. Therefore, OPENINFO of DBMS to be connected from HMS must be set.
Initializes a database connection, and defines it by using the syntax provided by each database.
HMSINDEX = numeric
The size: 0 - 65535
Processes the messages of HMS. It must be a unique value in a domain.
HMSMAXTHR = numeric
The size: 0 - 65535
Number of threads not involved in storage processing.
This value must be increased to a large enough number to handle message transmission when only non-persistent messages are sent and received. Besides the non-persistent messages, it must be properly specified large enough to ensure basic operations of HMS.
HMSMAXDBTHR = numeric
The size: 0 - 65535
Number of threads involved in storage processing.
This value must be large enough to transmit persistent messages. Besides the persistent messages, it must be properly specified large enough to ensure basic operations of HMS.
HMSSUBSCFG = string
The size: No more than 255 characters
Path and name of an environment file in which durable subscribers are set. In the file, the labels are set with [TopicName], and each line contains ClientName:Listener:Selector by separating them with a colon (:).
Durable subscribes defined in an environment file are automatically registered when HMS starts.
HMSMSGLIVE = numeric
The size: 0 - 65535 (the unit: hour)
HMS stores persistent messages in a storage. It is the time to remove the messages in a storage periodically.
The topic messages received by all subscribers and the queue messages consumed completely are removed from the storage after a specified period of time. Messages that are not received by a durable subscriber yet are not removed even though a specified period of time expires.
HMSPORT = numeric
Port number used to communicate between the clustered HMSs.
If there is a destination that has the GLOBAL property, HMS listens with the specified port number. Be aware not to use a port number already in use.
HMSHEARTBEAT = numeric
The size: 0 - 65535 (the unit: second)
Interval to send a heartbeat message between HMSs in a clustered environment to detect a network failure.
If HMS does not receive the heartbeat reply from another HMS, it regards the situation as a failure and disconnects the connection to the HMS.
HMSGQINT = numeric
The size: 0 - 65535 (the unit: millisecond)
Interval to exchange the status information between the queues with the GLOBAL property.
This option must be specified to use clustered queues. Specifying a short interval allows exact state transmissions but may result in heavy network loads.
The following describes how to configure the HMS clause.
*HMS Destination Name SVGNAME=string, TYPE=TOPIC | QUEUE, [BOOT=WARM | (COLD),] [GLOBAL=Y | (N),] [GQTHR=numeric,] [GQMAXREQ=numeric,] [GQFULL=numeric]
Destination Name = string
The size: No more than 15 characters
Name of a destination. Producers and consumers are created by using this name.
SVGNAME = string
The size: No more than 15 characters
Name of a HMS server group in which a destination exists.
SVGNAME must be the name of a HMS server group defined in the SVRGROUP clause.
TYPE = TOPIC | QUEUE
Type of a destination. TOPIC and QUEUE are currently supported.
BOOT = WARM | COLD
The default value: COLD
Specifies whether to restore the unprocessed messages when a destination is started.
The options are WARM and COLD. The default value is COLD.
Option | Description |
---|---|
WARM | Restores the messages that remain unprocessed in a storage. |
COLD | Removes all messages. |
GLOBAL = Y | N
The default value: N
Enables the destinations, which have the same name in clustered HMSs, to logically operate as a single destination.
To set GLOBAL, HMSPORT must be set in the SVRGROUP clause.
To set GLOBAL for a queue, the following GQTHR, GQMAXREQ, and GQFULL options need to be set additionally.
GQTHR = numeric
The size : 0 ~ 65535
Value to determine the buffer size that will be maintained by the clustered queue.
Buffer size = (The number of consumers) X (GQTHR Value)
If the length of the current queue is less than the buffer size, the messages will be retrieved from another clustered queue. If a queue has fewer message than the buffer size when having received a message distribution request, it will not distribute messages to another node.
GQMAXREQ = numeric
The size: 1 - 65535
Number of messages that can be retrieved from another clustered node at a time. If this value is large, messages will be filled with small number of requests. However, if it is too large, there may be unnecessary message transmission between nodes.
GQFULL = numeric
The size: 0 - 65535
If too many messages are accumulated in a clustered queue compared to other queues or the messages have not been consumed, the exceeded number of messages will be distributed to a clustered queue of another node.
The following is an example of specifying the use HMS in the environment file.
*DOMAIN Domain1 SHMKEY=0x11936, TMMLOGLVL = "DEBUG1", CLHLOGLVL = "DEBUG1", MINCLH = 1, MAXCLH = 1, TPORTNO = 7783, MAXSESSION = 1024 *NODE Node1 TMAXDIR = "/data/tmax", APPDIR = "/data/tmax/appbin/", MAXSESSION = 1024 *SVRGROUP svghms NODENAME = "node1", CPC=1, SVGTYPE="HMS", RESTART=N, OPENINFO = "ORACLE_XA+Acc=P/scott/tiger+SesTm=60+Threads=true", HMSSUBSCFG = "/data/tmax/config/hmssubsconfig", HMSNAME = "hms_ora", HMSSINDEX = 1, HMSMSGLIVE = 1, HMSMAXTHR = 4, HMSMAXDBTHR = 10 *SERVER … *SERVICE … *HMS queue1 SVGNAME = svghms, TYPE = "QUEUE", BOOT = "WARM", GLOBAL = N topic1 SVGNAME = svghms, TYPE = "TOPIC", BOOT = "WARM", GLOBAL = N
The following is an example of an environment configuration specified in HMSSUBSCFG.
[TOPIC1] Durable0:listener: Durable1:listener: Durable2:listener: