Sun Java System Message Queue 3.7 UR1 Administration Guide

Persistence Properties

Message QueueTM 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 

Description 

imq.persist.store

String 

file

Model for persistent data storage:  

    file: File-based persistence


    jdbc: JDBC-based persistence


File-Based Persistence

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

Table 14–5 Broker Properties for File-Based Persistence

Property 

Type 

Default 

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.


JDBC-Based Persistence

Table 14–6 lists the broker properties related to JDBC-based persistence. Examples shown are for the PointBase® family of database products from DataMirror Mobile Solutions, Inc.

Table 14–6 Broker Properties for JDBC-Based Persistence

Property 

Example 

Description 

imq.persist.jdbc.brokerid

Not required for PointBase embedded version 

(Optional) Broker instance identifier

Must be an alphanumeric string of no more thann - 12 characters, where n is the maximum table name length allowed by the database.

This identifier is appended to database table names to make them unique in the case where more than one broker instance is using the same database as a persistent data store. It is usually unnecessary for an embedded database, which stores data for only one broker instance.  

imq.persist.jdbc.driver

com.pointbase.jdbc.jdbcUniversalDriver

Java class name of JDBC driver for connecting to database

imq.persist.jdbc.opendburl

jdbc:pointbase:embedded:dbName;

    database.home=
    
       .../instances/instanceName/dbstore
    

URL for opening connection to existing database

imq.persist.jdbc.createdburl

jdbc:pointbase:embedded:dbName;

    new,database.home=
    
       .../instances/instanceName/dbstore
    

(Optional) URL for creating new database

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

imq.persist.jdbc.closedburl

Not required for PointBase 

(Optional) URL for closing database connection

imq.persist.jdbc.user

 

(Optional) User name for opening database connection, if required

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

imq.persist.jdbc.needpassword

 

(Optional) Does database 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.password [Should be used only in password files]

 

(Optional) Password for opening database connection

imq.persist.jdbc.table.IMQSV35

CREATE TABLE ${name}

    (STOREVERSION INTEGER NOT NULL,
    
     BROKERID VARCHAR(100))
    

SQL command to create version table

imq.persist.jdbc.table.IMQCCREC35

CREATE TABLE ${name}

    (RECORDTIME BIGINT NOT NULL,
    
     RECORD BLOB(10k))
    

SQL command to create configuration change record table

imq.persist.jdbc.table.IMQDEST35

CREATE TABLE ${name}

    (DID VARCHAR(100) NOT NULL,
    
     DEST BLOB(10k),
    
     primaryKey(DID))
    

SQL command to create destination table

imq.persist.jdbc.table.IMQINT35

CREATE TABLE ${name}

    (CUID BIGINT NOT NULL,
    
     INTEREST BLOB(10k),
    
     primaryKey(CUID))
    

SQL command to create interest table

imq.persist.jdbc.table.IMQMSG35

CREATE TABLE ${name}

    (MID VARCHAR(100) NOT NULL,
    
     DID VARCHAR(100),
    
     MSGSIZE BIGINT,
    
     MSG BLOB(1m),
    
     primaryKey(MID))
    

SQL command to create message table

The default maximum length for the MSG column is 1 megabyte (1m). If you expect to have messages larger than this, set the length accordingly. If the tables have already been created, you must re-create them to change the maximum message length.

imq.persist.jdbc.table.IMQPROPS35

CREATE TABLE ${name}

    (PROPNAME VARCHAR(100) NOT NULL,
    
     PROPVALUE BLOB(10k),
    
     primaryKey(PROPNAME))
    

SQL command to create property table

imq.persist.jdbc.table.IMQILIST35

CREATE TABLE ${name}

    (MID VARCHAR(100) NOT NULL,
    
     CUID BIGINT,
    
     DID VARCHAR(100),
    
     STATE INTEGER,
    
     primaryKey(MID, CUID))
    

SQL command to create interest state table

imq.persist.jdbc.table.IMQTXN35

CREATE TABLE ${name}

    (TUID BIGINT NOT NULL,
    
     STATE INTEGER,
    
     TSTATEOBJ BLOB(10K),
    
     primaryKey(TUID))
    

SQL command to create transaction table

imq.persist.jdbc.table.IMQTACK35

CREATE TABLE ${name}

    (TUID BIGINT NOT NULL,
    
     TXNACK BLOB(10k))
    

SQL command to create transaction acknowledgment table