crtmqm (create queue manager)

 

Purpose

Use the crtmqm command to create a local queue manager and define the default and system 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 LogFileSize-'  '- -lp LogPrimaryFiles-'
 
>--+------------------------+--+------+------------------------->
   '- -ls LogSecondaryFiles-'  '- -q -'
 
>--+----------------------+--+-------------------+-------------->
   '- -g ApplicationGroup-'  '- -t IntervalValue-'
 
>--+---------------------+-------------------------------------->
   '- -u DeadLetterQueue-'
 
>--+--------------------------------+--+------+--queue_manager------><
   '- -x MaximumUncommittedMessages-'  '- -z -'
 
 

 

Required parameters

queue_manager
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. You 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.

Note: Choose the logging arrangements with care, because you cannot change them 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:\Program Files\IBM\WebSphere MQ\log\qmgr (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 LogFileSize
The size of the log files in units of 4 KB.

In WebSphere MQ for Windows, the minimum value is 32, and the maximum is 16 384. The default value is 256, giving a default log size of 1 MB.

In WebSphere MQ for UNIX systems, the minimum value is 64, and the maximum is 16 384. The default value is 1024, giving a default log size of 4 MB.

-lp LogPrimaryFiles
The number of primary log files to be allocated. The default value is 3, the minimum is 2, and the maximum is 62.

-ls LogSecondaryFiles
The number of secondary log files to be allocated. The default value is 2, the minimum is 1, and the maximum is 61.

Note:

The total number of log files is restricted to 63, regardless of the number requested.

The limits given in the previous parameter descriptions are limits set by WebSphere MQ. Operating system limits might reduce the maximum possible log size.

-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 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.

You 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

 

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

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.