To create a physical destination, use the imqcmd create subcommand. This is the syntax for the create subcommand:
create dst -t destType -n destName [-o property=value ] [-o property=value1] …
For example, to create a queue destination, enter a command like the following:
imqcmd create dst -n myQueue -t q -o “maxNumActiveConsumers=5”
To create a topic destination, enter a command like the following:
imqcmd create dst -n myTopic -t t -o “maxBytesPerMsg=5000”
When creating a physical destination, you specify the following:
The physical destination type, t (topic) or q (queue).
The physical destination name. The naming rules are as follows:
The name must contain only alphanumeric characters. It cannot contain spaces.
The name can begin with an alphabetic character, the underscore character (_) or the dollar sign ($). It cannot begin with the character string mq.
Nondefault values for the physical destination’s properties.
You can also set properties when you update a physical destination.
Many physical destination properties affect broker memory resources and message flow. For example, you can specify the number of producers that can send to a physical destination, the number and size of the messages they can send, and the response that the broker should take when physical destination limits are reached. The limits are similar to brokerwide limits controlled by broker configuration properties.
The following properties are used for both queue destinations and topic destinations:
maxNumMsgs. Specifies the maximum number of unconsumed messages allowed in the physical destination.
maxBytesPerMsg. Specifies the maximum size (in bytes) of any single message allowed in the physical destination.
isLocalOnly. Applies only to broker clusters. Specifies that a physical destination is not replicated on other brokers, and is limited to delivering messages only to local consumers (consumers connected to the broker on which the physical destination is created).
useDMQ. Specifies whether a physical destination’s dead messages are discarded or put on the dead message queue.
The following properties are used for queue destinations only:
maxNumBackupConsumers. Specifies the maximum number of backup consumers that can take the place of active consumers, if any fail during load-balanced delivery from a queue destination.
localDeliveryPreferred. Applies only to load-balanced queue delivery in broker clusters. Specifies that messages be delivered to remote consumers only if there are no consumers on the local broker.
See Chapter 15, Physical Destination Property Reference for full reference information about physical destination properties.
For auto-created destinations, you set default property values in the broker’s instance configuration file. Reference information on auto-create properties is located in Table 14–3.