Table of Contents
This chapter describes how to configure the JMS engines and resources that are used to run a JEUS MQ server.
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".
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.
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".
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.
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]
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.
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".
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".
On the JMS Engine page, you can configure JEUS MQ servers. Go to [Servers] > [Server Name] > [Engine] tab, and select the [JMS Engine] menu.
The JMS Engine screen contains the following menus.
Menu | Description |
---|---|
[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". |
You can configure JMS resources on the JMS Resources page. Go to [Servers] > [Server Name] > [Resources] tab, and select the [JMS Resources] menu.
The JMS Resources screen contains the following two sections.
Section | Description |
---|---|
Destination | JEUS MQ server destination setting. For more information, refer to "3.2.1. Configuring Destinations". |
Durable Subscriber | Durable Subscriber setting for JEUS MQ servers. For more information, refer to "3.2.2. Configuring Durable Subscribers". |
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].
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.
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.
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.
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].
You can configure JEUS MQ servers on the JMS Engine page. Go to [Servers] > [Server Name] > [Engine] tab, and select the [JMS Engine] menu.
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".
In the Advanced Options section of the JMS engine page, you can configure the thread pool information.
When the asynchronous JMS messaging method is used, the tasks of sending, receiving, processing, and storing messages are performed by separate threads.
With the thread pool property, you can configure the number of threads that can concurrently run on the JEUS MQ server. Because this value greatly affects 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 section.
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.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].
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].
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.
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.
Database
Configure an external database as a persistent store as in the following example.
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".
For more information about message sorting, refer to "6.2. JEUS MQ Message Sort".
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.
The following describes how to manage servers using jeusadmin and 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.
Destination
Go to [Servers] > [Resources] > [JMS Resources] to see the list of Destinations.
Durable Subscriber
Go to [Servers] > [Resources] > [JMS Resources] to see the list of Durable Subscribers.
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
Command | Description |
---|---|
add-jms-connection-factory | Adds connection factories. |
remove-jms-connection-factory | Deletes connection factories. |
Destination commands
Command | Description |
---|---|
add-jms-destination | Adds destinations. |
remove-jms-destination | Deletes destinations. |
For more information about the commands, refer to JEUS Reference Book. "4.2.10. JMS Engine Commands".
Servers can be monitored using jmsadmin and 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".
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.
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.
JMS Pending Transactions
To see the list of JMS in-doubt transactions, click [JMS Pending Transactions].
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
Command | Description |
---|---|
list-jms-connection-factories | Checks the connection factory list and displays connection factory information. |
Destinations
Command | Description |
---|---|
list-jms-destinations | Checks the destination list and displays destination information. |
control-jms-destination | Controls the state of a specified destination. |
Messages
Command | Description |
---|---|
list-jms-messages | Searches for messages in a specified destination. |
view-jms-message | Searches for the detailed information of a specified message. |
move-jms-messages | Moves the specified messages to another destination in the cluster or server. |
delete-jms-messages | Deletes the specified messages from the destination. |
export-jms-messages | Sends the specified messages in the XML format. |
import-jms-messages | Retrieves the exported XML messages to the specified destination. |
Durable Subscriptions
Command | Description |
---|---|
list-jms-durable-subscriptions | Searches the list of Durable Subscriptions or the information about a specified Durable Subscription. |
Clients
Command | Description |
---|---|
list-jms-clients | Searches the list of clients and displays the client information. |
ban-jms-client | Forcibly closes the connection with the client. |
Transactions
Command | Description |
---|---|
list-jms-pending-transactions | Displays the list of pending transactions. |
commit-jms-pending-transaction | Forcibly commits the specified pending transaction. |
For more information about the commands, refer to JEUS Reference Book. "4.2.10. JMS Engine Commands".