Sun Java System Message Queue 4.1 Administration Guide

Persistence Properties

Message Queue supports both file-based and JDBC-based models for persistent data storage. The broker property imq.persist.store (Table 14–4) specifies which model to use. The following sections describe the broker configuration properties for the two models.

Table 14–4 Global Broker Persistence Property

Property 

Type 

Default Value 

Description 

imq.persist.store

String 

file

Model for persistent data storage:  

    file: File-based persistence


    jdbc: JDBC-based persistence


Must be set to jdbc for high-availability brokers (imq.cluster.ha = true).

File-Based Persistence Properties

Table 14–5 lists the broker properties related to file-based persistence.

Table 14–5 Broker Properties for File-Based Persistence

Property 

Type 

Default Value 

Description 

imq.persist.file.message.max_record_size

String 

1m

Maximum-size message to add to message storage file 

Any message exceeding this size will be stored in a separate file of its own.  

     

The value may be expressed in bytes, kilobytes, or megabytes, using the following suffixes:  

    b: Bytes


    k: Kilobytes (1024 bytes)


    m: Megabytes (1024 × 1024 = 1,048,576 bytes)


An unsuffixed value is expressed in bytes.  

     

Examples:

    1600: 1600 bytes


    1600b: 1600 bytes


    16k: 16 kilobytes (= 16,384 bytes)


    16m: 16 megabytes (= 16,777,216 bytes)


imq.persist.file.destination.message.filepool.limit

Integer 

100

Maximum number of free files available for reuse in destination file pool 

Free files in excess of this limit will be deleted. The broker will create and delete additional files in excess of the limit as needed.  

The higher the limit, the faster the broker can process persistent data.  

imq.persist.file.message.filepool.cleanratio

Integer 

0

Percentage of files in free file pools to be maintained in a clean (empty) state 

The higher this value, the less disk space is required for the file pool, but the more overhead is needed to clean files during operation.  

imq.persist.file.message.cleanup

Boolean 

false

Clean up files in free file pools on shutdown?  

Setting this property to true saves disk space for the file store, but slows broker shutdown.

imq.persist.file.sync.enabled

Boolean 

false

Synchronize in-memory state with physical storage device? 

Setting this property to true eliminates data loss due to system crashes, but at a cost in performance.


Note –

If running Sun Cluster and the Sun Cluster Data Service for Message Queue, set this property to true for brokers on all cluster nodes.


imq.persist.file.transaction.memorymappedfile.enabled

Boolean 

true

Use memory-mapped file to store transaction data?  

Setting this property to true improves performance at the cost of increased memory usage. Set to false for file systems that do not support memory-mapped files.

JDBC-Based Persistence Properties

Table 14–6 lists the broker properties related to JDBC-based persistence. The imq.persist.jdbc.dbVendor property identifies the database vendor being used for the cluster’s persistent data store; all of the remaining properties are qualified by this vendor name.

Table 14–6 Broker Properties for JDBC-Based Persistence

Property 

Type 

Default Value 

Description 

imq.persist.jdbc.dbVendor

String 

derby

Name of database vendor for persistent data store:  

    hadb: HADB (Sun Microsystems, Inc.)


    derby: Java DB (Derby, Apache Software Foundation)


    oracle: Oracle Real Application Cluster (Oracle Corporation)


    mysql: MySQL (MySQL AB)


imq.persist.jdbc.vendorName.driver

String 

None 

Java class name of JDBC driver for connecting to database from vendor vendorName

imq.persist.jdbc.vendorName.opendburl

String 

None 

URL for connecting to existing database from vendor vendorName

imq.persist.jdbc.vendorName.createdburl [Optional]

String 

None 

URL for creating new database from vendor vendorName

Needed only if the database will be created using the Message Queue Database Manager utility (imqdbmgr).

imq.persist.jdbc.vendorName.closedburl

String 

None 

URL for closing connection to database from vendor vendorName

imq.persist.jdbc.vendorName.user

String 

None 

User name, if required, for connecting to database from vendor vendorName

For security reasons, the value can instead be specified using command line options imqbrokerd -dbuser and imqdbmgr -u.

imq.persist.jdbc.vendorName.needpassword

Boolean 

false

Does database from vendor vendorName require a password for broker access?

If true, the imqbrokerd and imqdbmgr commands will prompt for a password, unless you use the -passfile option to specify a password file containing it.

imq.persist.jdbc.vendorName.password, [Should be used only in password files]

String 

None 

Password, if required, for connecting to database from vendor vendorName

imq.persist.jdbc.vendorName.property.propName

String 

None 

Vendor-specific property propName for database from vendor vendorName