Chapter 4. Reliable Queue Server (RQS) Process Management

Table of Contents

4.1. Overview
4.2. Operation of RQS Processes
4.2.1. Starting and Terminating RQS Processes
4.2.2. Monitoring RQS Processes
4.2.3. Restarting RQS Processes in Abnormal Status
4.3. Configuring the Environment
4.3.1. Configuration File

This chapter describes a node manager that manages Reliable Queue Server (RQS) processes.

4.1. Overview

A node manager manages non-server processes (currently RQS processes) as well as server processes. It starts and terminates RQS processes, checks whether they are alive, and restarts them if they were terminated abnormally. For this, the node manager operates regardless of server or node configuration and uses separately configured information.

Note

RQS processes are managed only by a node manager located in the same machine (node). RQS processes cannot be managed if a node manager does not operate.

4.2. Operation of RQS Processes

The following describes how a node manager manages RQS processes.

4.2.1. Starting and Terminating RQS Processes

An RQS process is started by using a file path and options set in a configuration file. Since the process is independent of a server, it starts and terminates regardless of a server. A node manager reads RQS-related configuration during startup and monitors RQS processes according to the information. If the node manager detects that no RQS process operates, it will start the process.

  1. A node manager reads RQS-related information from the jeusnm.xml file and saves it.

  2. The node manager creates an RQS management object by using RQS-related information and then a monitoring thread.

  3. The monitoring thread accesses RQS processes by using the RQS-related information and monitors the processes.

  4. If an RQS process that is terminated abnormally or does not send a response is detected, it will be restarted.

Note

RQS processes are restarted in the same order as above.

4.2.2. Monitoring RQS Processes

While RQS processes are monitored, a monitoring-related file is not created. Messages sent and received between a monitoring thread and RQS processes are used to access and monitor RQS processes and determine whether RQS processes are terminated normally. If a node manager cannot receive a response message from an RQS process after sending a message for checking the status of the RQS process several times, it will determine that the RQS process is terminated abnormally.

4.2.3. Restarting RQS Processes in Abnormal Status

If a node manager determines that an RQS process is terminated abnormally, the process will be restarted. Before restarting the process, the process is killed to make sure that the process is terminated. After restarting the process, a monitoring thread is created to monitor the restarted process.

4.3. Configuring the Environment

A node manager uses RQS-related configuration to manage RQS processes. RQS processes are started and managed through the configuration.

4.3.1. Configuration File

RQS processes are started and managed through configuration in rqsList of the jeusnm.xml file. The processes are created and removed by modifying the jeusnm.xml file.

ItemDescription
processList

Information about RQS processes.

Each RQS item under processList contains information about a single process.

To manage multiple RQS processes, add as many RQS items under processList as the number of RQS processes.

  • RQS

    ItemDescription
    domainName

    Name of an RQS process group.

    Multiple RQS processes are included in a group with this name. (Required)

    processName

    Name of an RQS process.

    This name is used to start or stop the RQS process. (Required)

    path

    Location of an executable file for an RQS process.

    The executable file in this location is executed to start the RQS process. (Required)

    port

    Port number used to monitor an RQS process.

    Messages are sent and received between a monitoring thread and the QS process through this port. (Required)

    option

    Argument required to execute RQS. You can specify options by referring to the RQS guide.

    rqsdir

    A configuration file is required to start each RQS process. That is, multiple configuration files are required to start multiple RQS processes.

    Through the RQSDIR environment variable, a configuration file can be accessed.

    retryCount

    Maximum number of retrying connection. (Default value: 5)

    monitoringPeriodTime interval of retrying connection. (Default value: 500)

Note

You can add or delete an RQS process by using the jeusnm.xml file. Under the processList item, you can configure properties for each RQS process and the node manager will manage them.