MQ and Queue Manager Configuration Files

 


Overview

The MQ configuration file (mqs.ini) is used to effect changes for WebSphere MQ on the node as a whole. There is one mqs.ini file for each node.

The queue manager configuration file (qm.ini) is used to effect changes for specific queue managers. There is one qm.ini file for each queue manager on the node.

A configuration file (or stanza file) contains one or more stanzas, which are groups of lines in the .ini file that together have a common function or define part of a system, such as log functions, channel functions, and installable services.

Because the WebSphere MQ configuration file is used to locate the data associated with queue managers, a nonexistent or incorrect configuration file can cause some or all MQSC commands to fail. Also, applications cannot connect to a queue manager that is not defined in the WebSphere MQ configuration file.

Any changes you make to a configuration file do not take effect until the next time the queue manager is started.

 

Editing configuration files

Before editing a configuration file, back it up so that you have a copy you can revert to if the need arises.

You can edit configuration files either:

  • Automatically, using commands that change the configuration of queue managers on the node

  • Manually, using a standard text editor

You can edit the default values in the WebSphere MQ configuration files after installation.

If you set an incorrect value on a configuration file attribute, the value is ignored and an operator message is issued to indicate the problem. (The effect is the same as missing out the attribute entirely.)

When you create a new queue manager:

  • Back up the WebSphere MQ configuration file
  • Back up the new queue manager configuration file

 

When do you need to edit a configuration file?

You might need to edit a configuration file if, for example:

  • You lose a configuration file. (Recover from backup if you can.)
  • You need to move one or more queue managers to a new directory.
  • You need to change your default queue manager; this could happen if you accidentally delete the existing queue manager.
  • You are advised to do so by your IBM Support Center.

 

Configuration file priorities

The attribute values of a configuration file are set according to the following priorities:

  • Parameters entered on the command line take precedence over values defined in the configuration files
  • Values defined in the qm.ini files take precedence over values defined in the mqs.ini file

 

The WebSphere MQ configuration file, mqs.ini

The WebSphere MQ configuration file, mqs.ini, contains information relevant to all the queue managers on the node. It is created automatically during installation.

The mqs.ini file for WebSphere MQ for UNIX systems is in the /var/mqm directory. It contains:

  • The names of the queue managers
  • The name of the default queue manager
  • The location of the files associated with each of them

Here is an example of a WebSphere MQ configuration file:

#***********************************************************************#
#* Module Name: mqs.ini                                                *#
#* Type       : WebSphere MQ Configuration File                        *#
#* Function   : Define WebSphere MQ resources for the node             *#
#***********************************************************************#
AllQueueManagers:
#***********************************************************************#
#* The path to the qmgrs directory, below which queue manager data     *#
#* is stored                                                           *#
#***********************************************************************#
DefaultPrefix=/var/mqm
 
LogDefaults:
   LogPrimaryFiles=3
   LogSecondaryFiles=2
   LogFilePages=1024
   LogType=CIRCULAR
   LogBufferPages=0
   LogDefaultPath=/var/mqm/log
 
QueueManager:
   Name=saturn.queue.manager
   Prefix=/var/mqm
   Directory=saturn!queue!manager
 
QueueManager:
   Name=pluto.queue.manager
   Prefix=/var/mqm
   Directory=pluto!queue!manager
 
DefaultQueueManager:
   Name=saturn.queue.manager

 

Queue manager configuration files, qm.ini

A queue manager configuration file, qm.ini, contains information relevant to a specific queue manager. There is one queue manager configuration file for each queue manager. The qm.ini file is automatically created when the queue manager with which it is associated is created.

A qm.ini file is held in the root of the directory tree occupied by the queue manager. For example, the path and the name for a configuration file for a queue manager called QMNAME is:

/var/mqm/qmgrs/QMNAME/qm.ini

The queue manager name can be up to 48 characters in length. However, this does not guarantee that the name is valid or unique. Therefore, a directory name is generated based on the queue manager name. This process is known as name transformation.

Here is an example that shows how groups of attributes might be arranged in a queue manager configuration file in WebSphere MQ for UNIX systems.

#*******************************************************************#
#* Module Name: qm.ini                                             *#
#* Type       : WebSphere MQ queue manager configuration file      *#
#  Function   : Define the configuration of a single queue manager *#
#*******************************************************************#
ExitPath:
   ExitsDefaultPath=/var/mqm/exits
 
Service:
   Name=AuthorizationService
   EntryPoints=9
 
ServiceComponent:
   Service=AuthorizationService
   Name=MQ.UNIX.auth.service
   Module=/opt/mqm/bin/amqzfuno.o 1
   ComponentDataSize=0
 
Service:
   Name=NameService
   EntryPoints=5
 
ServiceComponent:
   Service=NameService
   Name=MQ.DCE.name.service
   Module=/opt/mqm/lib/amqzfa 2
   ComponentDataSize=0
 
Log:
   LogPrimaryFiles=3
   LogSecondaryFiles=2
   LogFilePages=1024
   LogType=CIRCULAR
   LogBufferPages=0
   LogPath=/var/mqm/log/saturn!queue!manager/
 
XAResourceManager:
  Name=DB2 Resource Manager Bank
  SwitchFile=/usr/bin/db2swit
  XAOpenString=MQBankDB
  XACloseString=
  ThreadOfControl=THREAD
 
 
CHANNELS:
  MaxChannels = 20         ; Maximum number of Channels allowed.
  MaxActiveChannels = 100  ; Maximum number of Channels allowed to be
                           ; active at any time.  
TCP:                       ; TCP/IP entries.
  KeepAlive = Yes          ; Switch KeepAlive on

 

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.