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 list page. Click on the name of the server to be set in the server list to go to the server configuration screen. It is recommended to use WebAdmin to configure JEUS MQ servers.

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

The following describes each JMS configuration screen. Since the [Basic] menu does not contain JMS related settings, its description is omitted.

[Resource]

On the JMS Resources page, you can 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. Configuration of other resources on the [Resources] tab including Listener, JMX Manager, Scheduler, Lifecycle Invocation, and External Resources is covered in "JEUS WebAdmin Guide".

[Engine]

On the JMS Engine page, you can 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 "Chapter 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

You can configure JMS resources on the JMS Resources page. 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. 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 page, select a resource from the list to go to the resource configuration page. 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 fail to be sent to a client and accumulate at the destination, an OutOfMemoryError may occur on the JVM and the server may be terminated. To avoid 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 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 message 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 are accumulated on the client and an OutOfMemory error occurs. To prevent this error, you need to 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

Messages arriving in the queue are stored in the server until the client calls to receive them, but Topic is only delivered to clients that exist at the moment the message arrives. In this case, if you want to keep the message until the client receives it while using the Topic, use the durable subscriber. Thus, you can only set the durable subscriber to the Topic type destination.

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 page, 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

You can configure JEUS MQ servers on the JMS Engine page. Go to [Servers] > [Server Name] > [Engine] tab, and select the [JMS Engine] menu.

3.3.1. Basic Information

Click [Basic] on the JMS Engine page. The basic JMS engine information page appears.

This page lists the failover settings and advanced JMS engine options. If you want to enable recovery from a server or network failure, you can configure the failover settings. 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 page, you can configure the thread pool information.

There are two main types of message handling in the JMS engine. First, a generic message is processed as a single thread by the event manager in order to avoid contention and concurrency. Other special functions, message transfer between cluster, transaction control, and JMS engine control are handled by a thread pool according to each type.

The following is the Advanced Options section.

[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 such as a 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.3. 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 page 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

    The following are other compatible external databases:

    • 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 with 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

You can manage the connection factories, destinations, and durable subscribers that are required for JMS in WebAdmin. The resources can be added or deleted using [Add] or [Delete].

  • 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] > [Resources] > [JMS Resources]to see the list of Destinations.

    [Figure 3.15] Destination Management

    Destination Management

  • Durable Subscriber

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

    [Figure 3.16] Durable Subscriber Management

    Durable Subscriber Management

Using the Console Tool

You can manage the server resources by executing various commands in the console tool. The console tool is 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.
  • Destination

    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 Subscription

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