HMS Configuration

To use HMS, HMS-related settings must be added to the Tmax configuration file. This chapter describes the HMS-related settings.

1. Tmax Environment Configuration

To use HMS, DOMAIN, NODE, SVRGROUP, and HMS sections need to be set.

1.1. DOMAIN Section

The following describes how to configure the DOMAIN section.

*DOMAIN
Domain1     [MAXSESSION = numeric]
Optional Parameters
  • MAXSESSION = numeric

    • Size: 1 to 65535

    • Default Value: 1024

    • Specifies the maximum number of sessions that can be created for HMSs within a domain.

1.2. NODE Section

The following describes how to configure the NODE section.

*NODE
Node1       [MAXSESSION = numeric]
Optional Parameters
  • MAXSESSION = numeric

    • Size: 1 to 65535

    • Default Value: 1024

    • Specifies the maximum number of sessions that can be created for HMSs within a node.

1.3. SVRGROUP Section

The following describes how to configure the SVRGROUP section.

*SVRGROUP
ServergroupName     NODENAME = node-name,
                    SVGTYPE = HMS,
                    HMSNAME = string,
                    OPENINFO = literal,
                    HMSINDEX = numeric,
                    HMSMAXTHR = numeric,
                    HMSMAXDBTHR = numeric,
                    [HMSMAXBULKTHR = numeric,]
                    [HMSMAXBULKSIZE = numeric,]
                    [HMSOPT = literal,]
                    [HMSSUBSCFG = string,]
                    [HMSMSGLIVE = numeric,]
                    [HMSPORT = numeric,]
                    [HMSHEARTBEAT = numeric,]
                    [HMSGQINT = numeric]
Required Parameters
  • ServergroupName = string

    • Size: Up to 15 characters

    • Logical name for the HMS server group. It must be a unique name in the SVRGROUP section.

  • NODENAME = string

    • Size: Up to 15 characters

    • Node in which the HMS server group exists. The NODENAME must be the name of a node defined in the NODE section.

  • SVGTYPE = string

    • Type of the server group. To use HMS, it must be set to HMS.

  • HMSNAME = string

    • Size: Up to 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

    • Size: 0 to 65535

    • Processes the messages of HMS. It must be a unique value in a domain.

  • HMSMAXTHR = numeric

    • Size: 0 to 65535

    • Number of threads not involved in storage processing.

    • This value must be increased sufficiently to handle message transmission when only non-persistent messages are sent and received. In addition to non-persistent messages, this parameter must be set to a minimum value to ensure the basic operation of HMS.

  • HMSMAXDBTHR = numeric

    • Size: 0 to 65535

    • Number of threads involved in storage processing.

    • If there are many persistent messages, this value should be increased. In addition to handling persistent messages, it must be set to a minimum value to ensure the basic operation of HMS.

Optional Parameters
  • HMSMAXBULKTHR = numeric

    • Range: 1 to 65535

    • Number of threads that handle HMS message storage in batch.

  • HMSMAXBULKSIZE = numeric

    • Range: 2 to 65535

    • Maximum number of messages that can be processed at once when handling HMS message storage in batch.

  • HMSOPT = literal

    • Size: Up to 255 characters

    • Defines the command options passed to the HMS process when HMS starts.

      Option Description

      -e filename

      Writes the standard error generated during HMS operation to a file.

      -o filename

      Writes the standard output generated during HMS operation to a file.

  • HMSSUBSCFG = string

    • Size: Up to 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

    • Size: 0 to 65535 (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

    • Size: 0 to 65535 (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

    • Size: 0 to 65535 (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.

1.4. HMS Section

The following describes how to configure the HMS section.

*HMS
DestinationName      SVGNAME = string,
                     TYPE = TOPIC | QUEUE,
                     [BOOT = WARM | (COLD),]
                     [GLOBAL = Y | (N),]
                     [GQTHR = numeric,]
                     [GQMAXREQ = numeric,]
                     [GQFULL = numeric]
Required Parameters
  • DestinationName = string

    • Size: Up to 15 characters

    • Name of a destination. Producers and consumers are created by using this name.

  • SVGNAME = string

    • Size: Up to 15 characters

    • Name of the HMS server group in which a destination exists.

    • SVGNAME must be the name of a HMS server group defined in the SVRGROUP section.

  • TYPE = TOPIC | QUEUE

    • Type of a destination. TOPIC and QUEUE are currently supported.

Optional Parameters
  • BOOT = WARM | COLD

    • 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. (Default Value)

  • GLOBAL = Y | N

    • 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 section.

    • To set GLOBAL for a queue, the following GQTHR, GQMAXREQ, and GQFULL options need to be set additionally.

  • GQTHR = numeric

    • Size: 0 to 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

    • Size: 1 to 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

    • Size: 0 to 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.

2. Example

The following is an example of specifying the use HMS in the configuration 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: