Broker configuration files contain property settings for configuring a broker. They are kept in a directory whose location depends on the operating system platform you are using; see Appendix A, Platform-Specific Locations of Message QueueTM Data for details. The directory stores the following files:
A default configuration file, default.properties, that is loaded on startup. This file is not editable, but you can read it to determine default settings and find the exact names of properties you want to change.
In addition, each individual broker instance has its own instance configuration file, as described below. If you connect broker instances in a cluster, you may also need to use a cluster configuration file to specify configuration information for the cluster; see Cluster Configuration Properties for more information.
At startup, the broker merges property values from the various configuration files. As shown in Figure 4–4, the files form a hierarchy in which values specified in the instance configuration file override those in the installation configuration file, which in turn override those in the default configuration file. At the top of the hierarchy, you can manually override any property values specified in the configuration files by using command line options to the imqbrokerd command.
The first time you run a broker, an instance configuration file is created containing configuration properties for that particular broker instance. The instance configuration file is named config.properties and is stored in a directory identified by the name of the broker instance to which it belongs:
(See Appendix A, Platform-Specific Locations of Message QueueTM Data for the location of the instances directory.) If the file does not yet exist, you must use the -name option when starting the broker (see Broker Utility), to specify an instance name that Message Queue can use to create the file.
The instances/instanceName directory and the instance configuration file are owned by the user who created the corresponding broker instance. The broker instance must always be restarted by that same user.
The instance configuration file is maintained by the broker instance and is modified when you make configuration changes using Message Queue administration utilities. You can also edit an instance configuration file by hand to customize the broker’s behavior and resource use. To do so, you must be the owner of the instances/ instanceName directory or log in as root to change the directory’s access privileges.
The broker reads its instance configuration file only at startup. To make permanent changes to the broker’s configuration, you must shut down the broker, edit the file, and then restart the broker. Property definitions in the file (or any configuration file) use the following syntax:
propertyName=value [[,value1] …]
For example, the following entry specifies that the broker will hold up to 50,000 messages in memory and persistent storage before rejecting additional messages:
The following entry specifies that a new log file will be created every day (86,400 seconds):
You can enter broker configuration options from the command line when you start a broker, or afterward.
At startup time, you use the Broker utility (imqbrokerd) to start a broker instance. Using the command’s -D option, you can specify any broker configuration property and its value; see Starting Brokers and Broker Utility for more information. If you start the broker as a Windows service, using the Service Administrator utility (imqsvcadmin), you use the -args option to specify startup configuration properties; see Service Administrator Utility.
You can also change certain broker properties while a broker instance is running. To modify the configuration of a running broker, you use the Command utility’s imqcmd update bkr command; see Updating Broker Properties and Broker Management.