Home

 

crtmqm (create queue manager)

 

 

Purpose

Use the crtmqm command to create a local queue manager and define the default and system objects. The objects created by crtmqm are listed in System and default objects. When a queue manager has been created, use the strmqm command to start it.

 

Syntax


>>-crtmqm--+------------+--+--------------------------------+--->     '- -c --Text-' '- -d --DefaultTransmissionQueue-'        .- -lc -.    >--+--------------------------+--+-------+---------------------->    '- -h --MaximumHandleLimit-' '- -ll -'    >--+----------------+--+---------------------+------------------>    '- -ld --LogPath-' '- -lf --LogFilePages-'    >--+------------------------+--+--------------------------+----->    '- -lp --LogPrimaryFiles-' '- -ls --LogSecondaryFiles-'    >--+------+--+------------------------+------------------------->    '- -q -' '- -g --ApplicationGroup-'    >--+---------------------+--+-----------------------+----------->    '- -t --IntervalValue-' '- -u --DeadLetterQueue-'    >--+----------------------------------+--+------+--QMgrName----><    '- -x --MaximumUncommittedMessages-' '- -z -'    

 

Required parameters

QMgrName

The name of the queue manager to create. The name can contain up to 48 characters. This must be the last item in the command.

 

Optional parameters

-c Text

Descriptive text for this queue manager. We can use up to 64 characters; the default is all blanks.

If you include special characters, enclose the description in double quotes. The maximum number of characters is reduced if the system is using a double-byte character set (DBCS).

-d DefaultTransmissionQueue

The name of the local transmission queue where remote messages are put if a transmission queue is not explicitly defined for their destination. There is no default.

-h MaximumHandleLimit

The maximum number of handles that any one application can have open at the same time.

Specify a value in the range 1 through 999 999 999. The default value is 256.

The next six parameter descriptions relate to logging, which is described in Using the log for recovery.

Choose the logging arrangements with care, because some cannot be changed once they are committed.

-lc

Use circular logging. This is the default logging method.

-ll

Use linear logging.

-ld LogPath

The directory used to hold log files.

In WebSphere MQ for Windows, the default is C:\\IBM\WebSphere MQ\log (assuming that C is your data drive).

In WebSphere MQ for UNIX systems, the default is /var/mqm/log.

User ID mqm and group mqm must have full authorities to the log files. If you change the locations of these files, give these authorities yourself. This occurs automatically if the log files are in their default locations.

-lf LogFilePages

The log data is held in a series of files called log files. The log file size is specified in units of 4 KB pages.

In WebSphere MQ for UNIX systems, the default number of log file pages is 1024, giving a log file size of 4 MB. The minimum number of log file pages is 64 and the maximum is 65 535.

In WebSphere MQ for Windows, the default number of log file pages is 256, giving a log file size of 1 MB. The minimum number of log file pages is 32 and the maximum is 65 535.

The size of the log files specified during queue manager creation cannot be changed for a queue manager.

-lp LogPrimaryFiles

The log files allocated when the queue manager is created.

The minimum number of primary log files we can have is 2 and the maximum is 254 on Windows, or 510 on UNIX systems. The default is 3.

The total number of primary and secondary log files must not exceed 255 on Windows, or 511 on UNIX systems, and must not be less than 3.

Operating system limits can reduce the maximum possible log size.

The value is examined when the queue manager is created or started. We can change it after the queue manager has been created. However, a change in the value is not effective until the queue manager is restarted, and the effect might not be immediate.

For more information on primary log files, see What logs look like.

To calculate the size of the primary log files, see Calculating the size of the log.

-ls LogSecondaryFiles

The log files allocated when the primary files are exhausted.

The minimum number of secondary log files is 1 and the maximum is 253 on Windows, or 509 on UNIX systems. The default number is 2.

The total number of primary and secondary log files must not exceed 255 on Windows, or 511 on UNIX systems, and must not be less than 3.

Operating system limits can reduce the maximum possible log size.

The value is examined when the queue manager is started. We can change this value, but changes do not become effective until the queue manager is restarted, and even then the effect might not be immediate.

For more information on the use of secondary log files, see What logs look like.

To calculate the size of the secondary log files, see Calculating the size of the log.

-q

Makes this queue manager the default queue manager. The new queue manager replaces any existing default queue manager.

If you accidentally use this flag and want to revert to an existing queue manager as the default queue manager, change the default queue manager as described in Making an existing queue manager the default.

-g ApplicationGroup

The name of the group containing members allowed to:

  • Run MQI applications

  • Update all IPCC resources

  • Change the contents of some queue manager directories

This option applies only to WebSphere MQ for AIX, Solaris, HP-UX, and Linux.

The default value is -g all, which allows unrestricted access.

The -g ApplicationGroup value is recorded in the queue manager configuration file, qm.ini.

The mqm user ID and the user executing the command must belong to the specified ApplicationGroup.

-t IntervalValue

The trigger time interval in milliseconds for all queues controlled by this queue manager. This value specifies the time after receiving a trigger-generating message when triggering is suspended. That is, if the arrival of a message on a queue causes a trigger message to be put on the initiation queue, any message arriving on the same queue within the specified interval does not generate another trigger message.

We can use the trigger time interval to ensure that your application is allowed sufficient time to deal with a trigger condition before it is alerted to deal with another on the same queue. You might choose to see all trigger events that happen; if so, set a low or zero value in this field.

Specify a value in the range 0 through 999 999 999. The default is 999 999 999 milliseconds, a time of more than 11 days. Allowing the default to be used effectively means that triggering is disabled after the first trigger message. However, an application can enable triggering again by servicing the queue using a command to alter the queue to reset the trigger attribute.

-u DeadLetterQueue

The name of the local queue that is to be used as the dead-letter (undelivered-message) queue. Messages are put on this queue if they cannot be routed to their correct destination.

The default is no dead-letter queue.

-x MaximumUncommittedMessages

The maximum number of uncommitted messages under any one syncpoint. That is, the sum of:

  • The number of messages that can be retrieved from queues

  • The number of messages that can be put on queues

  • Any trigger messages generated within this unit of work

This limit does not apply to messages that are retrieved or put outside a syncpoint.

Specify a value in the range 1 through 999 999 999. The default value is 10 000 uncommitted messages.

-z

Suppresses error messages.

This flag is used within WebSphere MQ to suppress unwanted error messages. Because using this flag can result in loss of information, do not use it when entering commands on a command line.

 

Return codes

0 Queue manager created
8 Queue manager already exists
49 Queue manager stopping
69 Storage not available
70 Queue space not available
71 Unexpected error
72 Queue manager name error
100 Log location invalid
111 Queue manager created. However, there was a problem processing the default queue manager definition in the product configuration file. The default queue manager specification might be incorrect.
115 Invalid log size
119 Permission denied (Windows only)

 

Examples

  1. This command creates a default queue manager called Paint.queue.manager, with a description of Paint shop, and creates the system and default objects. It also specifies that linear logging is to be used:
    crtmqm -c "Paint shop" -ll -q Paint.queue.manager

  2. This command creates a default queue manager called Paint.queue.manager, creates the system and default objects, and requests two primary and three secondary log files:
    crtmqm -c "Paint shop" -ll -lp 2 -ls 3 -q Paint.queue.manager

  3. This command creates a queue manager called travel, creates the system and default objects, sets the trigger interval to 5000 milliseconds (or 5 seconds), and specifies SYSTEM.DEAD.LETTER.QUEUE as its dead-letter queue.
    crtmqm -t 5000 -u SYSTEM.DEAD.LETTER.QUEUE travel

 

Related commands

strmqm Start queue manager
endmqm End queue manager
dltmqm Delete queue manager

 

Parent topic:

The control commands


fa15650_


 

Home