Permanent destinations

To provide permanent destinations for JMS client applications, define message queues and message topics using EAServer Manager. When you create a permanent destination, you can optimize its configuration properties, which benefits every JMS client application that uses the destination. Message queues and topics are both called message consumers.

StepsAdding a message queue

  1. Highlight Configured Queues, right-click, and select Add.

  2. In the New Queue dialog box, enter a name for the message queue.

  3. Click OK.

StepsConfiguring a message queue’s properties

  1. To edit properties for an active queue, select Active Queues; to edit properties for an inactive queue, select Configured Queues.

  2. Select a queue from the list, right-click, and select Properties.

  3. In the Queue Properties dialog box, select the Configuration tab.

  4. To edit a configuration property, click on its property value. The Modify Property dialog box opens.

  5. Edit the property value and click OK. The properties are defined in Table 8-1.

Table 8-1: Message queue properties

Property

Datatype

Default value

Description

IGNORE_DUPLICATE_KEY

boolean

false

Set to true to avoid duplicate messages when the message producer sends a message outside a transaction or forwards a message from a remote system. You can use this option with the CORBA API, where you can specify the message key before producing a message.

maximum

long

0

The maximum number of messages held in memory for an active queue. When the limit is reached, messages are discarded in the order that they would have been retrieved.

The default of 0, or a negative size value, specifies that there is no limit on the number of transient messages in the queue. In this case, the number of persistent messages in the queue is limited by the default.maximum setting in the MessageServiceConfig.props file—see “Configuring the message service”.

If a persistent message is discarded from memory, you can still retrieve it from the database. Transient messages are not stored in the database, so if they are discarded from memory, they are lost.

qop

string

“none”

Indicates the quality of protection required for the message queue object.

REQUIRES_ACKNOWLEDGE

boolean

false

Set to true to guarantee that each persistent message is delivered at least once. Transient messages may be lost if a server fails.

REQUIRES_TRANSACTION

boolean

false

Set to true to guarantee that a persistent message is delivered only once, which means that only one transaction can receive the message and successfully commit.

share

boolean

true

Indicates whether multiple clients can simultaneously receive messages from the queue. When a queue is not shared, only one client at a time can receive messages from it. If other clients try to receive a message, they get an OBJECT_NOT_EXIST system exception.

store

boolean

true

Indicates whether to store replicated transient messages that are added to the queue. To avoid duplicate message processing within a cluster where a shared queue may reside in memory on multiple servers, set to true.

table

string

“none”

To save the queue’s messages in a database table other than message_queue, enter the table name.

timeout

long

0

The number of seconds the queue remains in memory when it is not being accessed by a client and it has no registered listener; set to zero or a negative number for no timeout. Any transient messages that are in memory when a timeout occurs are discarded.

StepsDeactivating a message queue

  1. Select Active Queues.

  2. Select a queue from the list, right-click, and select Close.

StepsDeleting all the messages in a queue

  1. Select Active Queues.

  2. Select a queue from the list, right-click, and select Flush.

StepsDeleting a message queue

  1. Select Configured Queues.

  2. Remove any listeners attached to the queue as follows:

    1. Highlight the message queue, and select File | Properties.

    2. In the Properties dialog box, select the Listeners tab.

    3. Highlight the listener name and click Delete.

  3. Right-click the queue and select Delete.

StepsAdding a topic

  1. Highlight Configured Topics, right-click, and select Add.

  2. In the New Topic dialog box, enter the topic name.

  3. Click OK.

StepsConfiguring a topic

  1. To configure an active topic, select Active Topics; to configure an inactive topic, select Configured Topics.

  2. Select a topic from the list, right-click, and select Properties.

  3. In the Topic Properties dialog box, select the Configuration tab.

  4. To edit the timeout property, click on the property value. A Modify Property dialog box opens.

  5. Edit the timeout value and click OK.

Property

Datatype

Default value

Description

timeout

long

0

Indicates the number of seconds the topic remains in memory when no active queues have selectors registered for the topic; set to zero or a negative number for no time out. Topics with no timeout are activated at server start-up.

StepsDeleting a topic

  1. Select Configured Topics.

  2. Select a topic from the list, right-click, and select Delete.

NoteThe message service includes a message queue and a thread pool called “<system>” for tasks that require internal messaging, such as synchronizing a cluster. The <system> message queue and thread pool are visible in EAServer Manager and as output from some jagtool commands. You cannot change the configuration of the <system> thread pool. You can change some properties of the <system> message queue, but only by changing the settings in the MessageServiceConfig.props file—see “Configuring the message service”.