Chapter 3. JEUS MQ Server Configuration

Table of Contents

3.1. Overview
3.1.1. Directory Structure
3.1.2. Screen Layout
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. Screen Layout

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.

  • [Basic]

  • [Resource]

  • [Engine]

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 Resource screen is used to configure JMS resources. Go to [Servers] > [Server Name] > [Resource] tab, and select the [Jms Resource] menu.

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

[Figure 3.2] Jms Resource Configuration

Jms Resource Configuration

Note

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

[Engine]

The Jms Resource screen is used to configure JMS 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.

3.2. Configuring JMS Resources

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

[Figure 3.4] Jms Resource Configuration

Jms Resource Configuration

The Jms Resource screen contains the following two sections.

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 Resource screen, select a resource from the list to go to the resource configuration screen.

[Figure 3.5] Destination Configuration

Destination Configuration

Enter the Destination settings and then click [OK]. To reset the settings, click [Reset].

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 Limit and High Mark property settings.

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

  • If the amount of memory used exceeds the High Mark value, the memory can no longer manage the stored messages. The default value is 96MB.

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 High Mark 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.

[Figure 3.6] Durable Subscriber Configuration

Durable Subscriber Configuration

Enter the Durable Subscriber settings and then click [OK]. To reset the settings, click [Reset].

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 "Chapter 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 broker name and 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.

[Figure 3.9] Service Channel Configuration

Service Channel Configuration

Enter the Service Config settings and then click [OK]. To reset the settings, click [Reset].

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.

[Figure 3.10] Connection Factory Configuration

Connection Factory Configuration

Enter the Connection Factory settings and then click [OK]. To reset the settings, click [Reset].

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.0 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. <BROKER-NAME>_DESTINATION, <BROKERNAME>_ DURSUBSCRIBER, <BROKER-NAME>_MESSAGE, <BROKER-NAME>_USRPROPERTY, <BROKER-NAME>_DURMESSAGE and <BROKER-NAME>_XA.

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.9. 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".

    [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

    [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 the 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.9. JMS Engine Commands.".