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]
[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.
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".
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".
The Jms Resource screen is used to configure JMS MQ servers. Go to [Servers] > [Server Name] > [Engine] tab, and select the [Jms Engine] menu.
The JMS Engine screen contains the following menus.
[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".
JMS resources can be configured from the Jms Resource screen. Go to [Servers] > [Server Name] > [Resource] tab, and select the [Jms Resource] menu.
The Jms Resource screen contains the following two sections.
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 Resource 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].
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.
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.
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.
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].
JEUS MQ servers can be configured from the Jms Engine screen. Go to [Servers] > [Server Name] > [Engine] tab, and select the [Jms Engine] menu.
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".
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.
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].
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].
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.
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".
For more information about message sorting, refer to "6.2. JEUS MQ Message Sort".
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.
The following describes how to manage servers using jeusadmin and 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.
Destination
Go to [Servers] > [Resource] > [Jms Resource] to see the list of Destinations.
Durable Subscriber
Go to [Servers] > [Resource] > [Jms Resource] to see the list of Durable Subscribers.
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
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.9. 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".
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
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 the 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.9. JMS Engine Commands.".