Chapter 3. JEUS MQ Server Configuration

Table of Contents

3.1. Overview
3.1.1. Directory Structure
3.1.2. WebAdmin
3.2. Configuring JMS Resources
3.2.1. Configuring Destinations
3.2.2. Configuring Durable Subscribers
3.3. Configuring JMS Engines
3.3.1. Basic Information
3.3.2. Configuring Service Channels
3.3.3. Configuring Connection Factories
3.3.4. Configuring Persistence Stores
3.3.5. Configuring Message Sorting
3.4. Server Management and Monitoring
3.4.1. Server Management
3.4.2. Server Monitoring

This chapter describes how to configure the JMS engines and resources that are used to run a JEUS MQ server.

3.1. Overview

A JEUS MQ server functions as a JMS engine in JEUS, and a single JEUS MQ server can run on each JEUS server. For more information about each component of JEUS, refer to JEUS Server Guide. "Chapter 1. Introduction".

3.1.1. Directory Structure

The following figure shows the location of files that are needed to set and manage JEUS and JEUS MQ servers. "JEUS_HOME" is the JEUS installation directory path.

[Figure 3.1] JEUS MQ Server Files

JEUS MQ Server Files

jeusadmin

A console tool for managing JEUS Manager. It provides overall management functions for JEUS including JEUS Manager and server control. For more information about how to use the tool, refer to JEUS Reference Book. "4.2. jeusadmin".

domain.xml

The path to the JEUS domain configuration file. It contains the JEUS MQ server settings.

The <jms-engine> element in the domain.xml file specifies the JMS engine settings, and the <jms-resource> element sets the resources that are required to run JMS engines such as queues or topics.

3.1.2. WebAdmin

Click [Servers] on the left pane to go to the Servers page. Click [Add] to add a server.

In JEUS WebAdmin, the JEUS MQ Server configuration includes the following menus.

It is recommended to use WebAdmin to configure JEUS MQ servers. The following describes each JMS configuration screen. Since the [Basic] menu does not contain JMS related settings, its description is omitted.

[Resource]

The JMS Resources screen is used to configure JMS resources. Go to [Servers] > [Server Name] > [Resources] tab, and select the [JMS Resources] menu.

The following is the JMS Resources page. For more information, refer to "3.2. Configuring JMS Resources".

[Figure 3.2] JMS Resources Configuration

JMS Resources Configuration

Note

This guide only covers JMS settings. Other configurations that are on the [Resources] tab including Listener, Jmx Manager, Scheduler, Lifecycle Invocation, and External Resource are covered in "JEUS WebAdmin Guide".

[Engine]

The JMS Engine screen is used to configure JEUS MQ servers. Go to [Servers] > [Server Name] > [Engine] tab, and select the [JMS Engine] menu.

[Figure 3.3] JMS Engine Configuration

JMS Engine Configuration

The JMS Engine screen contains the following menus.

MenuDescription
[Basic]Failover settings for JEUS MQ servers and advanced options for JMS engines. For more information about failover, refer to "제5장 JEUS MQ Failover". For more information about advanced options of JMS engines, refer to "3.3.1. Basic Information".
[Service Config]Service channel settings for messaging service. For more information, refer to "3.3.2. Configuring Service Channels".
[Connection Factory]Connection factory settings. Connection factory is a JMS management object used by JEUS MQ server. For more information, refer to "3.3.3. Configuring Connection Factories".
[Persistence Store]Persistent Object settings. For more information, refer to "3.3.4. Configuring Persistence Stores".
[Message Sort]Message Sort setting for JEUS MQ server. For more information, refer to "6.2. JEUS MQ Message Sort".

3.2. Configuring JMS Resources

JMS resources can be configured from the JMS Resources screen. Go to [Servers] > [Server Name] > [Resources] tab, and select the [JMS Resources] menu.

[Figure 3.4] JMS Resource Configuration

JMS Resource Configuration

The JMS Resources screen contains the following two sections.

SectionDescription
DestinationJEUS MQ server destination setting. For more information, refer to "3.2.1. Configuring Destinations".
Durable SubscriberDurable Subscriber setting for JEUS MQ servers. For more information, refer to "3.2.2. Configuring Durable Subscribers".

3.2.1. Configuring Destinations

Like Queues or Topics, JEUS MQ servers register destinations in JEUS JNDI Service by reading the domain configuration.

In the Destination section of the JMS Resources screen, select a resource from the list to go to the resource configuration screen. Enter the Destination settings and then click [OK]. To reset the settings, click [Reset].

[Figure 3.5] Destination Configuration

Destination Configuration

Destination Memory Management

If messages, which could not be sent to a client, are accumulated at the destination, an OutOfMemoryError may occur on the JVM and the server may be terminated. To resolve this problem, JEUS MQ applies different memory management policies for each destination.

JEUS MQ servers hold strong references to message contents when the destination does not use a lot of memory. JEUS MQ servers operate according to the 'Quota' property settings.

  • If the amount of memory used exceeds the 'Quota' value, messages from the clients will trigger a JMSException. The default value is 128 MB.

  • If the amount of memory used exceeds 75% of the 'Quota' value, the memory can no longer manage the stored messages.

Even after a message at a destination is deleted from the memory, the message will not be lost. Since the message is saved in the storage, a JEUS MQ server can read and process the messages in the storage when necessary. The processing speed is slower when using the storage than memory.

Note

The memory of a JEUS MQ server always keeps the messages that are not saved in the storage. The 'Quota' property is applicable only when a storage is configured and a message is set to DeliveryMode.PERSISTENT.

Controlling Message Flow

The "Max Pending Limit" and "Resume Dispatch Factor'" properties in the destination screen are used to control the message flow. If the message listener is registered in a queue or topic, and when messages arrive, the messages will be immediately sent to the consumers. If the client cannot process the messages fast enough, the messages will be accumulated on the client and an OutOfMemory error will be raised. To prevent such error, specify the maximum number of messages that can accumulate on the client after which the server suspends sending messages for a given time.

3.2.2. Configuring Durable Subscribers

Since durable subscribers are created by clients, if the message that is sent to the topic arrives before the durable subscriber is created, it does not get delivered to the client. To resolve this problem, JEUS MQ registers a durable subscriber before the server starts so that it can send a message when a client is connected. Similar to invoking the Session.createDurableSubscriber() method, the client ID, subscription name, and topic must be specified when configuring a durable subscriber using JEUS WebAdmin. A message selector can also be configured.

In the Durable Subscriber section of the JMS Resource screen, select a resource from the list to go to the resource configuration screen. Enter the Durable Subscriber settings and then click [OK]. To reset the settings, click [Reset].

[Figure 3.6] Durable Subscriber Configuration

Durable Subscriber Configuration

3.3. Configuring JMS Engines

JEUS MQ servers can be configured from the JMS Engine screen. Go to [Servers] > [Server Name] > [Engine] tab, and select the [JMS Engine] menu.

3.3.1. Basic Information

When [Basic] is clicked from the JMS Engine screen, the basic JMS engine information screen appears.

This screen consists of the failover settings and advanced JMS engine options. The failover settings can be configured to recover from a server or network failure. For more information about the failover settings, refer to "제5장 JEUS MQ Failover".

[Figure 3.7] JMS Engine Configuration

JMS Engine Configuration

Advanced Options

In the Advanced Options section of the JMS engine screen, configure the thread pool information.

When using the asynchronous JMS messaging method, the task of sending, receiving, processing, and storing messages are each performed by a separate thread.

The thread pool property configures the number of threads that can concurrently run on the JEUS MQ server. Since this value can greatly influence the server's performance, it must be properly configured by considering the number of simultaneous user accesses and server loads.

The following is the Advanced Options screen.

[Figure 3.8] JMS Engine - Advanced Options

JMS Engine - Advanced Options

3.3.2. Configuring Service Channels

A JEUS MQ server communicates with a client through a service channel. Each JEUS MQ server must have one service channel, and it is possible to set a different network (e.g. Service URL) for each service channel. To set a listener that the service channel uses, go to [Servers] > [Resource] > [Listener]. For more information about listeners, refer to JEUS Server Guide. "2.3.2. Listener Configuration".

Go to [Servers] > [Server Name] > [Engine] > [JMS Engine] > [Service Config] to see the list of listeners for the service channel. When a listener is selected from the list, the following configuration screen appears. Enter the Service Config settings and then click [OK]. To reset the settings, click [Reset].

[Figure 3.9] Service Channel Configuration

Service Channel Configuration

3.3.3. Configuring Connection Factories

A Connection Factory is a JMS management object that contains the connection information needed to access the JMS server and basic information for the client. It is created when the JEUS MQ server boots, and registered in the JEUS JNDI service.

Go to [Servers] > [Server Name] > [Engine] > [JMS Engine] > [Connection Factory] to see the list of Connection Factories. When a Connection Factory is selected from the list, the following configuration screen appears. Enter the Connection Factory settings and then click [OK]. To reset the settings, click [Reset].

[Figure 3.10] Connection Factory Configuration

Connection Factory Configuration

3.3.4. Configuring Persistence Stores

A Persistence Store is needed to restore messages, subscriptions, or transactions to the previous state when the server restarts. If a Persistence Store is not configured, a message that the client sent in the DeliveryMode.PERSISTENT mode cannot be properly delivered if the server fails. JEUS MQ provides two types of Persistence Stores, journal log and database.

To configure a Persistence Store, go to [Servers] > [Engine] > [JMS Engine] > [Persistence Store] in WebAdmin.

[Figure 3.11] Persistence Store Configuration

Persistence Store Configuration

Select Journal to use the logging method or select Jdbc to use the database method for the Persistent Store.

  • Journal Log

    Configure a Journal as a Persistent Store as in the following example.

    [Figure 3.12] Persistence Store Configuration - Journal

    Persistence Store Configuration - Journal


  • Database

    Configure an external database as a Persistent Store as in the following example.

    [Figure 3.13] Persistence Store Configuration - Jdbc

    Persistence Store Configuration - Jdbc

    • Compatible external databases are:

      • Oracle Database 9i and later (Enterprise Edition)

      • Tibero 3 SP2 and later

      • Altibase 4.x (5 and later are not supported.)

      The Data Source property configures a database as a data source. For more information about adding datasources to JEUS, refer to JEUS Server Guide. "Chapter 6. DB Connection Pool and JDBC".

      The JNDI configuration is used to change the names of tables in the database. If the aforementioned basic configurations are used, the JEUS MQ server that is in operation can be tested by changing the table names, without having to install additional Persistence Stores. The following tables in the database are used by default if table names are not configured. <SERVER-NAME>_DEST, <SERVER-NAME>_DSUB, <SERVER-NAME>_MESG, <SERVER-NAME>_SMSG, and <SERVER-NAME>_TRAN.

    For detailed information about each column of the tables created when JDBC is configured, refer to "Appendix B. JDBC Persistence Store Columns".

3.3.5. Configuring Message Sorting

For more information about message sorting, refer to "6.2. JEUS MQ Message Sort".

3.4. Server Management and Monitoring

JEUS MQ servers should be managed through the following functions in order to guarantee seamless services without message loss.

  • Manages and monitors the resources on running JEUS MQ servers.

    The following resources are managed and monitored.

    • JMS management objects including connection factories and destinations

    • Messages in destinations and durable subscriptions

    • Connections, sessions, and message producers and consumers

    • Memory space occupied by JEUS MQ servers

    • Persistent storage used by JEUS MQ servers

  • Handles failures and recovers JEUS MQ servers from them.

This chapter introduces how to manage JEUS MQ servers with jmsadmin, the JEUS console tool, and WebAdmin.

3.4.1. Server Management

The following describes how to manage servers using jeusadmin and WebAdmin.

Using WebAdmin

The Connection Factories, Destinations, and Durable Subscribers that are required for JMS can be managed in WebAdmin. The resources can be added or deleted using [ADD] or [DEL].

  • Connection Factory

    Go to [Servers] > [Engine] > [JMS Engine] > [Connection Factory] to see the list of Connection Factories.

    [Figure 3.14] Connection Factory Management

    Connection Factory Management

  • Destination

    Go to [Servers] > [Resource] > [JMS Resource] to see the list of Destinations.

    [Figure 3.15] Destination Management

    Destination Management

  • Durable Subscriber

    Go to [Servers] > [Resource] > [JMS Resource] to see the list of Durable Subscribers.

    [Figure 3.16] Durable Subscriber Management

    Durable Subscriber Management

Using the Console Tool

The server resources can be managed by executing various commands in the console tool. The console tool can be found in the following directory.

JEUS_HOME/bin/

The following are the jmsadmin commands.

  • Connection factory commands

    CommandDescription
    add-jms-connection-factoryAdds connection factories.
    remove-jms-connection-factoryDeletes connection factories.
  • Destination commands

    CommandDescription
    add-jms-destinationAdds destinations.
    remove-jms-destinationDeletes destinations.

Note

For more information about the commands, refer to JEUS Reference Book. "4.2.10. JMS Engine Commands".

3.4.2. Server Monitoring

Servers can be monitored using jmsadmin and WebAdmin.

Using WebAdmin

Go to [Monitoring] > [JMS] to monitor the current status of JEUS MQ servers.

  • Destinations

    Go to [Destinations] > [Server] or [Cluster]. Select a server or cluster from the drop-down list to display information about the destinations that exist on the server or cluster.

    When a destination name is clicked, more information about the destination appears. For the destination search or monitoring functions, refer to "6.5. JEUS MQ Message Management Functions".

    [Figure 3.17] Destination Monitoring

    Destination Monitoring

  • Durable Subscriptions

    Go to [Durable Subscriptions] > [Server] or [Cluster]. Select a server or cluster from the drop-down list to display information about the destinations that exist on the server or cluster.

    [Figure 3.18] Durable Subscriptions Monitoring

    Durable Subscriptions Monitoring

  • JMS Clients

    Click [JMS Clients] and select a server from the drop-down list to display information about the JMS clients that exist on the server.

    [Figure 3.19] Client Monitoring

    Client Monitoring

  • JMS Pending Transactions

    To see the list of JMS in-doubt transactions, click [JMS Pending Transactions].

    [Figure 3.20] JMS Pending Transaction Monitoring

    JMS Pending Transaction Monitoring

Using the Console Tool

Server resources can be checked by executing various commands in the console tool. The console tool is in the following directory.

JEUS_HOME/bin/

The following commands are provided for server monitoring.

  • Connection factories

    CommandDescription
    list-jms-connection-factoriesChecks the connection factory list and displays connection factory information.
  • Destinations

    CommandDescription
    list-jms-destinationsChecks the destination list and displays destination information.
    control-jms-destinationControls the state of a specified destination.
  • Messages

    CommandDescription
    list-jms-messagesSearches for messages in a specified destination.
    view-jms-messageSearches for the detailed information of a specified message.
    move-jms-messagesMoves the specified messages to another destination in the cluster or server.
    delete-jms-messagesDeletes the specified messages from the destination.
    export-jms-messagesSends the specified messages in the XML format.
    import-jms-messagesRetrieves the exported XML messages to the specified destination.
  • Durable Subscriptions

    CommandDescription
    list-jms-durable-subscriptionsSearches the list of Durable Subscriptions or the information about a specified Durable Subscription.
  • Clients

    CommandDescription
    list-jms-clientsSearches the list of clients and displays the client information.
    ban-jms-clientForcibly closes the connection with the client.
  • Transactions

    CommandDescription
    list-jms-pending-transactionsDisplays the list of pending transactions.
    commit-jms-pending-transactionForcibly commits the specified pending transaction.

Note

For more information about the commands, refer to JEUS Reference Book. "4.2.10. JMS Engine Commands".